Create New Zone

Create a new ad zone for your site

PHP

Replace the following:
[ZONE_NAME] with your zones name
[ZONE_DESC] with your zones description
[SITE_ID] with one of your site IDs - List sites
[RESTRICTIONS] with your restrictions - List ad zone restrictions
[TRAFFIC_TYPE] with your traffic type - List traffic types
[ZONE_TYPE] with your zone type - List ad zone types
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'name'=>'[ZONE_NAME]',
    'description'=>'[ZONE_DESC]',
    'site'=>[SITE_ID],
    'restrictions'=>'[RESTRICTIONS]',
    'traffic_type'=>[TRAFFIC_TYPE],
    'zone_type'=>[ZONE_TYPE]
  );
  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/types/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_POST, true);
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Language