Here is my code
$ch = curl_init();
$timeout = 10;
curl_setopt($ch,CURLOPT_URL, "http://stackoverflow.com");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
$data = curl_exec($ch);
echo curl_errno($ch);
Always I am getting error "curl error 6 couldn't resolve host" I have also checked phpinfo(). My curl functions are enabled there. Also allow_remote_url_open is also true at php.ini. and openssl is also enabled at phpinfo().
Is there any server specific settings, which is not helping curl to run ? Or do I need to check any other settings at php.ini ?