PHP code example of positivezero / adzerk

1. Go to this page and download the library: Download positivezero/adzerk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

positivezero / adzerk example snippets


$adzerk = new Adzerk(API_KEY)
$response = $adzerk->site()->get();

$adzerk->advertiser
$adzerk->channel
$adzerk->site
...

$adzerk->channel()->create()
$adzerk->channel(/*optional*/ $id)->get()
$adzerk->channel($id)->update()
$adzerk->channel($id)->delete()

$list = $adzerk->channel()->get();

$list = $adzerk->channel(5541)->get();

$object = $adzerk->channel();
$object->Id = 0;
$object->Title = 'Some name';
$object->AdTypes = array(1,3,4);
$object->Engine = 'CPM';
$object->CPM   = 10.00;
$response = $object->create();

$object = $adzerk->channel(5541);
$object->Title = 'Some name';
$object->CPM   = 10.00;
$response = $object->update();

$object = $adzerk->channel(5541);
$object->delete();