Re: problem with fread
| From: | Henning Sprang | Date: | Tue, 07 May 2002 10:09:46 +0000 |
| Subject: | Re: problem with fread | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-96386@lists.php.net to get a copy of this message | ||
> <?php
> $output = ""; // Clear output
> $url = "http://whatever.com/file.html"; // whatever
> you wanna pull from
>
> if ($fp = fopen($url, "r")) {
> while ($tmp = fget($fp, 4096)) $output .= $tmp;
> fclose($fp);
> }
>
> echo "The URL's content is: ".$output;
> ?>
erm, don't wanna be nosy, but you meant fgets() - forgot the "s" - didn't
you?
just for others who read that one...
anyway, so it's safe and clean to use this one.
thank you very much!
henning