I got the same error. Maybe it's the ISP.. My site is hosted by Freedom2Surf, everything worked fine on my own machine (RH6.1 linux with apache, php4). But when i uploaded it to the server i got those errors.
I anyone want to look at the scripts:
http://www.dkb2.f2s.com/fopen.php
//**************source*****
<?php
$file = fopen("http://www.php.net/", "r");
if (!$file)
{
echo "<p>Unable to open remote file.\n";
exit;
}
while (!feof($file))
{
$line = fgets($file, 1024);
if (eregi("<title>(.)</title>", $line, $out))
{
$title = $out[1];
break;
}
}
fclose($file);
?>
//**********************end
You can look at phpinfo() at URL:
http://www.dkb2.f2s.com/test.php
If the problem lies at the ISP can you give other ISP's where it DOES work.
I believe that you helped a lot of people...
Thanks,
Mark
ps the script it from PHPBuilder.com