Re[2]: [PHP] supressing include warnings....
| From: | Richard Davey | Date: | Wed, 07 Jan 2004 03:19:59 +0000 |
| Subject: | Re[2]: [PHP] supressing include warnings.... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173940@lists.php.net to get a copy of this message | ||
Hello Ryan,
Wednesday, January 7, 2004, 3:07:16 AM, you wrote:
RA> Warning:
RA> fopen(http://www.site.com/a/check.php?ver=2&update=0): failed to
RA> open stream: HTTP request failed! HTTP/1.1 404 Not Found in /blah/i.php on
RA> line 74
For me simply using the @ sign as you did before (with include())
worked:
$file = @fopen ("http://www.site.com/a/check.php?ver=2&update=0",
"r");
if (!$file) {
echo "<p>Unable to open remote file.\n";
exit;
}
while (!feof ($file)) {
$line = fgets ($file, 1024);
echo $line;
}
fclose($file);
If that doesn't work for you perhaps a different method of opening the
file is required? (Socket access maybe)
--
Best regards,
Richard mailto:rich@launchcode.co.uk