问题
I was trying to fetch details from a third party using API call.It is working fine with my localhost but when I uploaded it to live server, it is returning an error like this. Why it is happening?. I am using godaddy server,so do I need to change any configuration in its cpanel?. following is my call to api using curl
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://test.httpapi.com/api/domains/available.json?auth-userid=65464&api-key=key&domain-name=".$domain."&tlds=com" );
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Accept: application/json',
'Content-Type: application/x-www-form-urlencoded;charset=UTF-8'
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSLVERSION, 3);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_VERBOSE, true);
$output = curl_exec($ch);
$searchResult = curl_getinfo($ch);curl_close($ch);
来源:https://stackoverflow.com/questions/48559355/why-i-am-getting-openssl-ssl-connect-ssl-error-syscall-in-connection-error-on