I'm trying to execute HTTPS request:
curl_setopt($curl, CURLOPT_URL, 'https://***.com');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_POST, false);
curl_setopt($curl, CURLOPT_COOKIEJAR, $cookiesFile);
curl_setopt($curl, CURLOPT_VERBOSE, true);
$out = curl_exec($curl);
After request, $out is empty, and I'm getting this log:
* About to connect() to ***.com port 443 (#0)
* Trying *.*.*.*...
* connected
* Connected to ***.com (*.*.*.*) port 443 (#0)
* error:14077458:SSL routines:SSL23_GET_SERVER_HELLO:reason(1112)
* Closing connection #0
Why?
Fix:
curl_setopt($ch, CURLOPT_SSLVERSION,3);
If you're using PRTG and get this error, go to settings and change from "SSL V2 or V3" to "SSL V3".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With