denoteone Posted September 17, 2010 Share Posted September 17, 2010 I am trying to pull page data from a web server using SSL with cURL. The owner of the web server gave me their CA certificate. When I run the code below all I get is a blanks screen (no errors) Is there anyway I can show were the script is breaking down? ini_set("display_errors","2"); ERROR_REPORTING(E_ALL); $url = "https://www.clientswebserver.com/"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1); curl_setopt($ch, CURLOPT_CAINFO, "/var/www/pathtoCAcert/curl-ca-bundle.crt"); $response = curl_exec($ch); curl_close($ch); print $response; The original CA cert I got was not named curl-ca-bundle.crt but I was told to rename it Link to comment https://forums.phpfreaks.com/topic/213625-get-errors-from-curl-functions/ Share on other sites More sharing options...
denoteone Posted September 17, 2010 Author Share Posted September 17, 2010 I am thinking I need to use CURLOPT_CAPATH instead of CURLOPT_CAINFO and then just put the cert in a directory. Link to comment https://forums.phpfreaks.com/topic/213625-get-errors-from-curl-functions/#findComment-1111926 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.