Edit Site

Edit a site in your account

PHP

Replace:
[SITE_ID] with the site id you want to edit
[SITE_NAME] with your new site name
[SITE_DESC] with your new description
[CATEGORY_ID] with a category id - List site categories
[YOUR_API_KEY] with your token

<?php
  $params = array(
    'name'=>[SITE_NAME],
    'description'=>[SITE_DESC],
    'category'=>[CATEGORY_ID]
  );
  $curl = curl_init('https://api.adnium.com/v1/publisher/site/[SITE_ID]/edit/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Language