[PHP] fread() considerations - used to be PHP Quesiotion From: DL Neil (PHPml <email protected>)
Date: 10/15/01

With due regard to the ListAdmin and filters, restating:
Subject: REJECTED: Re: [PHP] Re: PHP Quesiotion [OT]

> _lallous (and other esteemed PHP elders),
>
> I have wondered about the second argument to fread() in applications such as this.
>
> > $fp = fopen('http://www.somehost.com/somescript.php?someparam=somevalue');
> > $content = '';
> > while (!feof($fp))
> > {
> > $content .= fread($fp, 4096);
> > }
> > fclose($fp);
>
> What are the virtues of (while) looping in order to accumulate the entire file into a single
string
> ($content), one 4K block at a time; instead of gulping the entire file down by requesting
> (say/aiming for overkill) a 2MB block once?
>
> Enquiring minds and all that!
> =dn
>
>
> > > How do I activate a rempote script from within my own script?
> > > I cant connect through sockets or that other way
> > > Regards,
> > > Georgie Casey
>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>