I am experiencing the same problem:
<?
$fp = fopen("http://www.bbc.co.uk","r");
$file = fread($fp, 10000);
fclose($fp);
echo "Success!";
?>
Returns this:
Warning: fopen("http://www.bbc.co.uk/","r") - Bad file descriptor in /home/public_html/test.php on line 2
Warning: Supplied argument is not a valid File-Handle resource in /home/public_html/test.php on line 3
Warning: Supplied argument is not a valid File-Handle resource in /home/public_html/test.php on line 4
Success!
However, if I use http://www.php.net/, I receive no warnings. And, this only occurs on the production server. All is well on my local machine.
Help appreciated. Oh, and to avoid debate the URLs will not result in a 404. ;-)