Commission Junction search results unreliable

Discussion in 'Commission Junction' started by Newwebdesigner, Oct 1, 2010.

  1. #1
    My code is returning incomplete results. My search is not returning products from advertisers even though you can go to their individual websites and see that they have them. I know this because when I search for this book on dealoz.com, which is a shopping comparison site, the following Commission Junction advertisers have the book: AbeBooks, Biblio, BiggerBooks, BookRenter, BooksAMillion, CourseSmart, Ecampus, PhatCampus, ValoreBooks. My code is not returning results for AbeBoosk, Biblio, BiggerBooks, BooksAMillion, CourseSmart, or phatCampus. Can you tell me why my code isn't displaying these?
    The ISBN of the particular book is: 9780321543257.

    Thanks again

    my code

    <?php
    $websiteid= "Your web key here";
    $CJ_DevKey= "your_key_here";
    $isbn= "9780321543257";
    $listing ="";
    $advs = "";
    $page = "";
    $keywords="";

    $targeturl="https://product-search.api.cj.com/v2/product-search?";
    $targeturl.="&website-id=$websiteid";
    //$targeturl.="&advertiser-ids=$advs";
    $targeturl.="&isbn=$isbn";
    //$targeturl.="&records-per-page=$listing";
    //$targeturl.="&page-number=$page";
    //$targeturl.="&keywords=$keywords";

    $ch = curl_init($targeturl);
    curl_setopt($ch, CURLOPT_POST, FAlSE);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: '.$CJ_DevKey));

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    $response = curl_exec($ch);
    curl_close($ch);
    $xml = simplexml_load_string($response);

    print_r ($xml);
    ?>
     
    Newwebdesigner, Oct 1, 2010 IP
  2. hearme

    hearme Active Member

    Messages:
    189
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #2
    i have tried and the code is working pretty fine which server you are using.
     
    hearme, Oct 9, 2010 IP