Re: file or fopen to fetch a web page???
| From: | Richard Lynch | Date: | Wed, 24 Jan 2001 00:25:04 +0000 |
| Subject: | Re: file or fopen to fetch a web page??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-36298@lists.php.net to get a copy of this message | ||
> I wonder myself, which method is better to fetch a web page:
>
> $file = fopen($url, "r");
> $page = fread($file, 50000);
>
> or
>
> $file = join('', file($url));
Probably about the same either way...
Maybe not building an array to build a string will save a little...
You could test it fairly quickly for yourself -- Probably best, as you never
know what your box might like better...
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm