Hello i want to get the product lists from cj, clickbank and linkshare via API’s to display the whole lists on my site , if this is possible or its a nightmare , where am i standing please generous reply is needed, tell me how to grab the product list using their respective API’s , i have found alot of blogs and posts regarding this but none is enough to solve my prob, thats y i said a nightmare.
this is what i got for clickbank
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.clickbank.com/rest/1.3/products/list");
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_HTTPGET, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/xml", "Authorization:DEV-7979307A05A8A50B6535A5AD5DCD8EDB060B:API-4D297E18498B51B70EA986DC7422B1BCE488"));
$result = curl_exec($ch);
curl_close($ch);
print_r($result);
the apikey and dev key is the real one of my affiliate account i created , i am giving the real info because i need it to be done, it is throwing the same error , site parameter is missing,
same is what i want for the other two.
much thanks in advance . cheers.
2
Answers
Okey , that question i posted was somewhat one and half month before , i know answers are present all around the web but scattered and i want them to be gathered so if some one need it can use it.
first of all i am giving you for CJ, Comission Junction: 1) Creat a page e.g cjcall.php and put the following code on that page.
THIS will give you responce of products against your keyword if it is matching products.
you can get you result the way you want i figured it this way that i created a new page called cjcronjob.php and put the following code on that page and run it , there you can use the product details, i.e may be save in the database.
//cjcronjob.php
nOW each product is in your control use it in here inside the foreach loop which will run twenty times here as specified in the curl call. clickbank is still a mystery , may be they dont allow you to perform more against their API
okey the second was linkshare product grabing from linkshare , which is a bit different than other affiliate channels, in a sence that here first you will create relation on the linkshare advertisers , and you can the products of those who will allow you to be his advertiser or affiliate:
here is the code:
under the foreach loop you can do what ever you want, just print_r($signprod) and you will get the details , put the keyword matching against your allowed advertiser’s product, by helping you more say i have a relation with some cookies site, who’s MID is xxxxx , then i write cookies in the keyword and it get results for me, do accordingly.
its simple and yeah it will take a long time on net if someone is new like me, which i was before more than a month ago.