
August 30th, 2009, 11:07 AM
|
|
|
|
SSL certificate problem
Hello all,
I am trying to access Commission Junction's API via a REST request. When I run the code below I get this error: "Curl error: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed "
My computer is running Apache, PHP and MySQL through WAMP. Is it possible that I don't have something in either PHP or Apache that I need to turn on? I have scoured the internet for hours and can't find an answer to this question.
Here is information regarding REST request from Commission Junction's website
http://help.cj.com/en/web_services/web_services.htm#product_catalog_search_service_rest.htm
PHP Code:
<?php $url = "https://product-search.api.cj.com/v2/product-search?website-id=XXXXXXX&advertiser-ids=1566996&serviceable-area=US&advertiser-sku=210790596&keywords=¤cy=USD"; $ch = curl_init(); $CJ_KEY ='00bc6addff460bdfb61689a6b153deca753cad4b171931e2bd715099f511dbe1f72944588882ba974f7be7a7490faad8f0 34209a4c5bb9f510bbcf1a3f3b4a7a77/0090be60307cf51e34d9f78110f4e7500ce442144f785174682826cd3f112b23d8d44136d0f9b5b48ea8089521ec76e295dc 50e1b2fa7754e2bb8905c05e152071'; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: ' . $CJ_KEY)); $curl_results = curl_exec($ch); $info = simplexml_load_string($curl_results); print_r($info); echo "Curl error: " . curl_error($ch) ?>
Last edited by NewWEBdesigner : August 30th, 2009 at 11:09 AM.
Reason: confused WINAMP with WAMP
|