On Wednesday 24 January 2001 01:25, Richard Lynch wrote:
> > 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...
Perhaps. In an earlier version of PHP I had a problem where the above
code (fopen...) read *more* than the page length. I.e. the page was e.g.
20k big and the fread appended ~5k of junk to it.
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
The use of COBOL cripples the mind; its teaching should, therefore,
be regarded as a criminal offence.
- Edsger W. Dijkstra
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]