hi,
i am having a real problem with opening a file from an outside server! please help, i would appreciate it a lot!
here is the code:
$filename = "http://www.yahoo.com";
$fp = fopen($filename,"r");
$page = fread($fp, filesize($filename));
fclose($fp);
and here is the error message:
Warning: stat failed for http://www.yahoo.com (errno=2 - No such file or directory)
i have really tried a lot of different things but am stumped.
i am on PHP Version 4.1.1 and apache 1.3.22.
phpinfo() says that allow_url_fopen is set to 1 both for Local and Master Values.
fopen("/www/test.php") works fine but fopen("http://localhost/test.php") (which is supposed to go to the same file!) does not.
file() has similar problems although i could swear it used to work a few days ago!
when i type in at the linux prompt:
host www.yahoo.com
i get:
www.yahoo.com is an alias for www.yahoo.akadns.net
etc. etc.
if anyone actually can give me a hint to help with this, thanks!!!
patrick