fread() considerations - used to be PHP Quesiotion

From: Date: Mon, 15 Oct 2001 14:32:14 +0000
Subject: fread() considerations - used to be PHP Quesiotion
Groups: php.general 
Request: Send a blank email to php-general+get-71110@lists.php.net to get a copy of this message
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 > > >

« previous php.general (#71110) next »