can't get image using php CURL with SSL can't get image using php CURL with SSL curl curl

can't get image using php CURL with SSL


What cURL version is your PHP using? Perhaps it doesn't support TLS 1.2 which was added in cURL 7.34.0.

Or your CA bundle might not recognize the CA of the site you are connecting to.

Try adding:

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);

To see the debug output from cURL in PHP like you get on the command line, you can add:

curl_setopt($ch, CURLOPT_VERBOSE, true);curl_setopt($ch, CURLOPT_STDERR, fopen('php://output', 'w'));

That might shed some light on the issue, as well as calling var_dump(curl_getinfo($ch)); after the request is executed.