im facing here a problem with this function :
function curl_function($uri)
{
$ch = curl_init($uri);
$timeout = 30; //set to zero for no timeout
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_USERAGENT, 'mycoreg');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
$file_contents = curl_exec($ch);
$errornum = curl_errno($ch);
$info = curl_getinfo($ch);
$status = (int) $info['http_code'];
if ($errornum !== 0) {
echo 'Error: ', curl_error($ch);
$file_contents = NULL;
}
curl_close($ch);
return $file_contents;
}
It gives the error that
"http protocol is not supported or disabled".
plz need help. thanks.
httpsis not supported instead ofhttp???