Giter Site home page Giter Site logo

adbutler-php's Introduction

AdButler PHP bindings

Travis Packagist Pre Release Total Downloads License

You can sign up for an AdButler account at https://adbutler.com.

If you are looking for documentation, go here: https://adbutler.com/docs/api?php

Requirements

  1. AdButler account
  2. PHP 5.6 or later

Installation

Composer

You can install the bindings via Composer. Run the following command:

composer require adbutler/adbutler-php

If you are installing a beta version, then you need to mention the version tag too e.g. composer require adbutler/adbutler-php 1.0.4-beta.

To use the bindings, use Composer's autoload:

require_once('vendor/autoload.php');

Manual Installation

If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the init.php file.

require_once('/path/to/adbutler-php/init.php');

Getting Started

Simple usage looks like:

\AdButler\API::init(array('api_key' => '45e8fca2dc0f896fd7cb4cb0031ba249'));

$advertiser = \AdButler\Advertiser::create(array(
  "can_change_password" => true,
  "can_add_banners" => true,
  "email" => "[email protected]",
  "name" => "Demo Advertiser",
  "password" => "some_password"
));

echo $advertiser;

Documentation

Please see https://adbutler.com/docs/api for up-to-date documentation.

License

ยฉ 2016โ€“2019 SparkLIT. Released under the MIT license.

adbutler-php's People

Contributors

baig avatar dharton avatar sanakhet avatar trevoradbutler avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

adbutler-php's Issues

zone tags

When I retrieve zone tag I get the same result as in doc

AdButler\ZoneTag JSON: {
  "object": "zone_tag",
  "url": "/v1/zones/banner/87000/tags",
  "data": {
    "async": "<script type=\"text/javascript\">if (!window.AdButler){(function(){var s = document.createElement(\"script\"); s.async = true; s.type = \"text/javascript\"; s.src = 'http://servedbyadbutler.com.baig.dev/app.js'; var n = document.getElementsByTagName(\"script\")[0]; n.parentNode.insertBefore(s, n);}());}</script>\n<script type=\"text/javascript\">\nvar AdButler = AdButler || {};\nAdButler.ads = AdButler.ads || [];\nar abkw = window.abkw || ';\nvar plc87000 = window.plc87000 || 0;\ndocument.write('<'+'div id=\"placement_87000_'+plc87000+'\"></'+'div>');\nAdButler.ads.push({handler: function(opt){ AdButler.register(107870, 87000, [120,90], 'placement_87000_'+opt.place, opt); }, opt: { place: plc87000++, keywords: abkw, domain: 'servedbyadbutler.com.baig.dev', click: CLICK_MACRO_PLACEHOLDER }});\n</script>\n<noscript>\n<a href=\"http://servedbyadbutler.com.baig.dev/go2/;ID=107870;size=120x90;setID=87000\" target=\"_blank\"><img src=\"http://servedbyadbutler.com.baig.dev/adserve/;ID=107870;size=120x90;setID=87000;type=img\" width=\"120\" height=\"90\"></a>\n</noscript>",
    "js": "<script type=\"text/javascript\">\nvar rnd = window.rnd || Math.floor(Math.random()*10e6);\nvar pid87000 = window.pid87000 || rnd;\nvar plc87000 = window.plc87000 || 0;\nvar abkw = window.abkw || ';\nvar absrc = 'http://servedbyadbutler.com.baig.dev/adserve/;ID=107870;size=120x90;setID=87000;type=js;sw='+screen.width+';sh='+screen.height+';spr='+window.devicePixelRatio+';kw='+abkw+';pid='+pid87000+';place='+(plc87000++)+';rnd='+rnd+';\ndocument.write('<scr'+'ipt src=\"'+absrc+'\" type=\"text/javascript\"></scr'+'ipt>');\n</script>\n<noscript>\n<a href=\"http://servedbyadbutler.com.baig.dev/go2/;ID=107870;size=120x90;setID=87000\" target=\"_blank\"><img src=\"http://servedbyadbutler.com.baig.dev/adserve/;ID=107870;size=120x90;setID=87000;type=img\" width=\"120\" height=\"90\"></a>\n</noscript>",
    "image": "<a href=\"http://servedbyadbutler.com.baig.dev/go2/;ID=107870;size=120x90;setID=87000\" target=\"_blank\"><img src=\"http://servedbyadbutler.com.baig.dev/adserve/;ID=107870;size=120x90;setID=87000;type=img\" width=\"120\" height=\"90\"></a>"
  }
}

and there is a typo in async key \nar abkw = window.abkw || ';, shoud be var abkw = window.abkw || ';

zone async tag

But when I fix #2 this typo manually a get this error
link

P.S. open new issue because can't comment on #2

Create Zone

Is there any way to create zone using this API?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.