I have a problem with php curl. I am using this script
curl_setopt($ch, CURLOPT_HEADER, true); // header will be at output
curl_setopt($ch, CURLOPT_NOBODY, false);
$content = curl_exec ($ch);
$info = curl_getinfo($ch);
if ($content === false || $info['http_code'] != 200) {
$output = "No cURL data returned for $url [". $info['http_code']. "]";
if (curl_error($ch))
$output .= "\n". curl_error($ch);
print $output;
}
else {
print $content;
}
curl_close ($ch);
?>
I am trying to connect to this website: kaztorka.org but gives me "empty reply from server" error. However it works fine with console CURL.
Thanks