fopen()

From: Date: Fri, 19 Jul 2002 23:46:15 +0000
Subject: fopen()
Groups: php.general 
Request: Send a blank email to php-general+get-108602@lists.php.net to get a copy of this message
Lo all, if (!($fc = fopen("http://www.google.com/search?hl=en&&ie=ISO-8859-1q=asdf", "r"))) { echo "couldnt open file."; } else { $content = fread($fc,10000000); } echo "$content\n"; Why doesn't this work? The browser reports the following back: Warning: fopen("http://www.google.com/search?hl=en&&ie=ISO-8859-1q=asdf", "r") - No error in c:\megalan\htdocs\test2.php on line 17 couldnt open file. Needless to say, I'm completely clueless on this one. All the code is right, when I change the URL to be something more sanitally correct such as http://server.com/file.extension it works perfectly. -- me

« previous php.general (#108602) next »