$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $xml_url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_HEADER, false);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 0);
$xml = curl_exec($ch);
if(curl_exec($ch) === false)
{ echo curl_error($ch); }
else
{ echo 'Operation completed without any errors'; }
curl_close($ch);
return $xml;
Above code is giving below error.
Unknown SSL protocol error in connection to api.site.com:443
As per suggested by many people that below code will resolve above issue but it is not helping. Still getting same error.
curl_setopt ($ch, CURLOPT_SSLVERSION, 3);
I tried below also as per suggestions but still getting same error.
curl_setopt ($ch, CURLOPT_SSLVERSION, 'CURL_SSLVERSION_SSLv3' );
Please suggest what else I should put in code to fix this error.
Thank you,