Answer the question
In order to leave comments, you need to log in
How to avoid SSL connect error in curl?
I'm trying to send a request via curl to an HTTPS page. Returns "SSL connect error". Is there a way around this error? Tell me what, where and where to look? My server settings, where does the request come from? Server settings where does the request come from?
Just in case, this is how I send the request, maybe I need to send some more additional options.
$ch = curl_init( $url );
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, $uagent);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$content = curl_exec( $ch );
$err = curl_errno( $ch );
curl_close( $ch );
Answer the question
In order to leave comments, you need to log in
Look towards CURLOPT_SSL_VERIFYHOST
Well, about CURLOPT_SSLVERSION just in case
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question