I have an url with RSS feed:
$url = 'http://www.myurl.com/sth?format=RSS';
I can open it in a browser without a problem. But
$feed->load($url)
returned 'false'. So I started investigating:
$ch = curl_init($file);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_exec($ch);
$retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
print curl_error($ch); // prints 'couldn't connect to host'
echo "CODE: ".$retcode; // $retcode is 0
$file_headers = get_headers($file);
echo $file_headers[0]; // is null
So, what can be the reason for such behaviour? Is some port blocked on myurl.com server? Is there a way to work around it (like create local copy of the file and work on it)?