<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>AdSpeed API</title><link>http://www.adspeed.com/Knowledges/46/AdSpeed_API.html</link><description>Documentation about building applications with AdSpeed API</description><image><title>AdSpeed API</title><link>http://www.adspeed.com/Knowledges/46/AdSpeed_API.html</link><url>http://www.adspeed.com/img/as/adspeed-chosen.gif</url></image><item><title>Ad</title><link>http://www.adspeed.com/Knowledges/1047/AdSpeed_API/Ad.html</link><guid>http://www.adspeed.com/Knowledges/1047/AdSpeed_API/Ad.html</guid><description>Documentation for API methods to manage one or multiple ads. API Version1.2.7 (build 20110606). Documentation was last modified on Sun, 29 Jan 12 20:25:56 -0500. Since the API methods and response format can change from one version to another, you should check this page frequently for updates.API Methods - AdAS.Ads.getCountsAS.Ads.getListAS.Ads.createStandardAS.Ads.createHTMLAS.Ads.createTextAS.Ad.linkToZoneAS.Ad.unlinkFromZoneAS.Ad.getServingCodeAS.Ad.getLinkedZonesAS.Ad.getServingCodeForLinkedZonesAS.Ad.getStatsAS.Ads.getCountsReturns the number of active, pending, deleted and total ads for the publisherParametersNoneSample RequestSample Response&lt;Ads total=&quot;8&quot; active=&quot;3&quot; pending=&quot;3&quot; archived=&quot;0&quot; deleted=&quot;2&quot;/&gt;AS.Ads.getListReturns the list of ads for this publisherParametersperpage (Optional, default value is 10)The number of items per pagepage (Optional, default value is 1)The page numberSample RequestSample Response&lt;Ads total=&quot;8&quot; page=&quot;1&quot; numpage=&quot;2&quot; perpage=&quot;4&quot;&gt; &lt;Ad id=&quot;35093&quot; name=&quot;Sample Text Ad&quot; status=&quot;active&quot;/&gt; &lt;Ad id=&quot;36943&quot; name=&quot;Sample Image Ad&quot; status=&quot;active&quot;/&gt; &lt;Ad id=&quot;40631&quot; name=&quot;Sample Rich HTML Ad&quot; status=&quot;pending&quot;/&gt; &lt;Ad id=&quot;54412&quot; name=&quot;Sample Text Link Ad&quot; status=&quot;pending&quot;/&gt; &lt;/Ads&gt;AS.Ads.createStandardCreate a new standard/external ad (SWF, JPG, GIF, PNG, BMP) for this account.  ...</description></item><item><title>AdSpeed API Overview</title><link>http://www.adspeed.com/Knowledges/830/AdSpeed_API/AdSpeed_API_Overview.html</link><guid>http://www.adspeed.com/Knowledges/830/AdSpeed_API/AdSpeed_API_Overview.html</guid><description>AdSpeed API (Application Programming Interface) is an add-on service we provide to our clients. Publishers and advertisers can write software to automatically collect information about their zones, ads, campaigns, and reports directly from AdSpeed. Web developers are also encouraged to use the API to build applications on our platform. We reserve the right to change the API details and decline or terminate access prior or without notice.  ...</description></item><item><title>Advertiser</title><link>http://www.adspeed.com/Knowledges/1051/AdSpeed_API/Advertiser.html</link><guid>http://www.adspeed.com/Knowledges/1051/AdSpeed_API/Advertiser.html</guid><description>Documentation for API methods to manage one or multiple advertisers. API Version1.2.7 (build 20110606). Documentation was last modified on Sun, 29 Jan 12 19:49:03 -0500. Since the API methods and response format can change from one version to another, you should check this page frequently for updates.API Methods - AdvertiserAS.Advertisers.getCountsAS.Advertisers.getListAS.Advertisers.createAS.Advertisers.getCountsReturns the number of active, deleted and total advertisers linked to this publisherParametersNoneSample RequestSample Response&lt;Advertisers total=&quot;22&quot; active=&quot;6&quot; pending=&quot;0&quot; deleted=&quot;16&quot;/&gt;AS.Advertisers.getListReturns the list of advertisers linked to this publisherParametersperpage (Optional, default value is 10)The number of items per pagepage (Optional, default value is 1)The page numberSample RequestSample Response&lt;Advertisers total=&quot;22&quot; page=&quot;1&quot; numpage=&quot;6&quot; perpage=&quot;4&quot;&gt; &lt;Advertiser id=&quot;1772&quot; name=&quot;advertiser&quot; status=&quot;active&quot;/&gt; &lt;Advertiser id=&quot;9066&quot; name=&quot;nupandu&quot; status=&quot;deleted&quot;/&gt; &lt;Advertiser id=&quot;9281&quot; name=&quot;pavanu&quot; status=&quot;deleted&quot;/&gt; &lt;Advertiser id=&quot;9292&quot; name=&quot;carat24&quot; status=&quot;deleted&quot;/&gt; &lt;/Advertisers&gt;AS.Advertisers.createCreate a new advertiser account and link it to my publisher account.  ...</description></item><item><title>Campaign</title><link>http://www.adspeed.com/Knowledges/1050/AdSpeed_API/Campaign.html</link><guid>http://www.adspeed.com/Knowledges/1050/AdSpeed_API/Campaign.html</guid><description>Documentation for API methods to manage one or multiple campaigns. API Version1.2.7 (build 20110606). Documentation was last modified on Sun, 29 Jan 12 19:49:04 -0500. Since the API methods and response format can change from one version to another, you should check this page frequently for updates.API Methods - CampaignAS.Campaigns.getCountsAS.Campaigns.getListAS.Campaigns.getCountsReturns the number of active, deleted and total campaigns linked to this advertiserParametersNoneSample RequestSample Response&lt;Campaigns total=&quot;1&quot; active=&quot;1&quot; deleted=&quot;0&quot;/&gt;AS.Campaigns.getListReturns the list of campaigns linked to this advertiserParametersperpage (Optional, default value is 10)The number of items per pagepage (Optional, default value is 1)The page numberSample RequestSample Response&lt;Campaigns total=&quot;1&quot; page=&quot;1&quot; numpage=&quot;1&quot; perpage=&quot;4&quot;&gt; &lt;Campaign id=&quot;3526&quot; name=&quot;Sample Campaign&quot; status=&quot;active&quot;/&gt; &lt;/Campaigns&gt;</description></item><item><title>Channels</title><link>http://www.adspeed.com/Knowledges/1166/AdSpeed_API/Channels.html</link><guid>http://www.adspeed.com/Knowledges/1166/AdSpeed_API/Channels.html</guid><description>Documentation for API methods to manage one or multiple channels. API Version1.2.7 (build 20110606). Documentation was last modified on Sun, 29 Jan 12 19:49:04 -0500. Since the API methods and response format can change from one version to another, you should check this page frequently for updates.API Methods - ChannelAS.Channels.getCountsAS.Channels.getListAS.Channels.getCountsReturns the number of active, deleted and total channels for the publisherParametersNoneSample RequestSample Response&lt;Channels total=&quot;0&quot; active=&quot;0&quot; deleted=&quot;0&quot;/&gt;AS.Channels.getListReturns the list of channels for this publisherParametersperpage (Optional, default value is 10)The number of items per pagepage (Optional, default value is 1)The page numberSample RequestSample Response&lt;Channels total=&quot;0&quot; page=&quot;1&quot; numpage=&quot;0&quot; perpage=&quot;4&quot;&gt; &lt;/Channels&gt;</description></item><item><title>Group</title><link>http://www.adspeed.com/Knowledges/1048/AdSpeed_API/Group.html</link><guid>http://www.adspeed.com/Knowledges/1048/AdSpeed_API/Group.html</guid><description>Documentation for API methods to manage one or multiple groups. API Version1.2.7 (build 20110606). Documentation was last modified on Sun, 29 Jan 12 19:49:04 -0500. Since the API methods and response format can change from one version to another, you should check this page frequently for updates.API Methods - GroupAS.Groups.getCountsAS.Groups.getListAS.Groups.getCountsReturns the number of active, deleted and total groups for the publisherParametersNoneSample RequestSample Response&lt;Groups total=&quot;1&quot; active=&quot;1&quot; deleted=&quot;0&quot;/&gt;AS.Groups.getListReturns the list of groups for this publisherParametersperpage (Optional, default value is 10)The number of items per pagepage (Optional, default value is 1)The page numberSample RequestSample Response&lt;Groups total=&quot;1&quot; page=&quot;1&quot; numpage=&quot;1&quot; perpage=&quot;4&quot;&gt; &lt;Group id=&quot;532&quot; name=&quot;top&quot; status=&quot;active&quot;/&gt; &lt;/Groups&gt;</description></item><item><title>Publisher</title><link>http://www.adspeed.com/Knowledges/1045/AdSpeed_API/Publisher.html</link><guid>http://www.adspeed.com/Knowledges/1045/AdSpeed_API/Publisher.html</guid><description>Documentation for API methods to manage a publisher account. API Version1.2.7 (build 20110606). Documentation was last modified on Sun, 29 Jan 12 20:25:55 -0500. Since the API methods and response format can change from one version to another, you should check this page frequently for updates.API Methods - PublisherAS.Publisher.getStatsAS.Publisher.getVisitorStatsAS.Publisher.getStatsReturns stats for the whole publisher account.  ...</description></item><item><title>Sample Code</title><link>http://www.adspeed.com/Knowledges/1039/AdSpeed_API/Sample_Code.html</link><guid>http://www.adspeed.com/Knowledges/1039/AdSpeed_API/Sample_Code.html</guid><description>Please see the example below to access AdSpeed API. PHP &lt;?php class MyApp { 	private $mEndPoint = 'http://api.adspeed.com/'; 	private $mKey = 'YOUR_KEY'; // change to your own key 	private $mSecret = 'YOUR_SECRET'; // change to your own secret 	/** 	* Request API method via GET 	* @param string method 	* @param array params 	* @return string 	*/ 	public function getAPI($pMethod,$pParams=array()) { 		$vParams = array('key'=&gt;$this-&gt;mKey,'method'=&gt;$pMethod); 		$vParams = array_merge($pParams,$vParams); 		ksort($vParams); // sort the params alphabetically 		$vParams['md5'] = md5($this-&gt;mSecret.http_build_query($vParams,'','&amp;')); 		$vURL = $this-&gt;mEndPoint.'?'.http_build_query($vParams,'','&amp;'); 		 		$vCURL = curl_init($vURL); 		curl_setopt($vCURL,CURLOPT_RETURNTRANSFER,1); // get XML result as string 		$vResult = curl_exec($vCURL); 		curl_close($vCURL); 		return $vResult; 	} 	/** 	* Request API method via POST 	* @param string method 	* @param array params 	* @return string 	*/ 	public function postAPI($pMethod,$pParams=array()) { 		$vParams = array('key'=&gt;$this-&gt;mKey,'method'=&gt;$pMethod); 		$vParams = array_merge($pParams,$vParams); 		ksort($vParams); // sort the params alphabetically 		$vParams['md5'] = md5($this-&gt;mSecret.http_build_query($vParams,'','&amp;')); 		 		$vCURL = curl_init($this-&gt;mEndPoint); 		curl_setopt($vCURL,CURLOPT_POST,1); // use POST instead of GET 		curl_setopt($vCURL,CURLOPT_POSTFIELDS,$vParams); 		curl_setopt($vCURL,CURLOPT_RETURNTRANSFER,1); // get XML result as string 		$vResult = curl_exec($vCURL); 		curl_close($vCURL); 		return $vResult; 	} 	 	/** 	* Sample usage 	* @return void 	*/ 	public function example() { 		// GET		 		$vResult = $this-&gt;getAPI('AS.Ads.getCounts'); 		var_dump($vResult); 		 		// POST 		$vParams = array( 			'name'=&gt;'TextAdViaAPI', 			'first'=&gt;'First Text Line', 			'next'=&gt;'Second Line', 			'clickurl'=&gt;'http://example.com', 		); 		$vResult = $this-&gt;postAPI('AS.Ads.createText',$vParams); 		var_dump($vResult); 	} } $vTest = new MyApp(); $vTest-&gt;example(); ?&gt; Token Hash Generation In certain methods that deal directly with one or more entities, a "token" parameter is required to verify ownership. The hash is generated by concatenating all the required fields into a single string and generating the MD5 hash for that string. Here is an example to generate token with format [Ad ID][Ad Name][Zone ID][Zone Name]: Ad ID = '1234' Ad Name = 'MyTestAd' Zone ID = '789' Zone Name = 'MyTestZone' token = md5('1234MyTestAd789MyTestZone') token = '971b6ebe7580f203905a0bf3fde9fd7b'</description></item><item><title>Website</title><link>http://www.adspeed.com/Knowledges/1049/AdSpeed_API/Website.html</link><guid>http://www.adspeed.com/Knowledges/1049/AdSpeed_API/Website.html</guid><description>Documentation for API methods to manage one or multiple websites. API Version1.2.7 (build 20110606). Documentation was last modified on Sun, 29 Jan 12 19:50:25 -0500. Since the API methods and response format can change from one version to another, you should check this page frequently for updates.API Methods - WebsiteAS.Websites.getCountsAS.Websites.getListAS.Website.getInfoAS.Website.getStatsAS.Websites.getCountsReturns the number of active, deleted and total websites for the publisherParametersNoneSample RequestSample Response&lt;Websites total=&quot;1&quot; active=&quot;1&quot; deleted=&quot;0&quot;/&gt;AS.Websites.getListReturns the list of websites for this publisherParametersperpage (Optional, default value is 10)The number of items per pagepage (Optional, default value is 1)The page numberSample RequestSample Response&lt;Websites total=&quot;1&quot; page=&quot;1&quot; numpage=&quot;1&quot; perpage=&quot;4&quot;&gt; &lt;Website id=&quot;89&quot; name=&quot;Site Partner A&quot; status=&quot;active&quot;/&gt; &lt;/Websites&gt;AS.Website.getInfoReturns the list of linked zones, ads and users for this websiteParameterssite (Required)The website IDtoken (Required)The authentication MD5 hash generated from concatenating [Site ID][Site Name]Sample RequestSample Response&lt;Website id=&quot;89&quot; name=&quot;Site Partner A&quot; status=&quot;active&quot;&gt; &lt;Description&gt;One member of the ad network&lt;/Description&gt; &lt;URL&gt;http://siteA.example.com/&lt;/URL&gt; &lt;Zones&gt; &lt;Zone id=&quot;7549&quot; name=&quot;Section Travel&quot; status=&quot;active&quot;&gt; &lt;Ads&gt; &lt;Ad id=&quot;35093&quot; name=&quot;Sample Text Ad&quot; status=&quot;active&quot;/&gt; &lt;Ad id=&quot;36943&quot; name=&quot;Sample Image Ad&quot; status=&quot;active&quot;/&gt; &lt;Ad id=&quot;54412&quot; name=&quot;Sample Text Link Ad&quot; status=&quot;pending&quot;/&gt; &lt;Ad id=&quot;54937&quot; name=&quot;Sample Rich HTML Ad 2&quot; status=&quot;active&quot;/&gt; &lt;/Ads&gt; &lt;/Zone&gt; &lt;/Zones&gt; &lt;/Website&gt;AS.Website.getStatsReturns the stats for this website.  ...</description></item><item><title>Zone</title><link>http://www.adspeed.com/Knowledges/1046/AdSpeed_API/Zone.html</link><guid>http://www.adspeed.com/Knowledges/1046/AdSpeed_API/Zone.html</guid><description>Documentation for API methods to manage one or multiple zones. API Version1.2.7 (build 20110606). Documentation was last modified on Sun, 29 Jan 12 20:17:05 -0500. Since the API methods and response format can change from one version to another, you should check this page frequently for updates.API Methods - ZoneAS.Zones.getCountsAS.Zones.getListAS.Zones.createAS.Zone.getInfoAS.Zone.getServingCodeAS.Zone.serveAS.Zone.getStatsAS.Zone.getVisitorStatsAS.Zones.getCountsReturns the number of active, deleted and total zones for the publisherParametersNoneSample RequestSample Response&lt;Zones total=&quot;4&quot; active=&quot;4&quot; deleted=&quot;0&quot;/&gt;AS.Zones.getListReturns the list of zones for this publisherParametersperpage (Optional, default value is 10)The number of items per page.  ...</description></item></channel></rss>
