Re: Zipping Output Before Sending To Browser

From: Date: Fri, 20 Jul 2001 14:30:23 +0000
Subject: Re: Zipping Output Before Sending To Browser
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-58906@lists.php.net to get a copy of this message
yup. what you need is ob_start("ob_gzhandler"); at the beginning of the bit you want to compress, usually at the top of the script and //ob_end_flush(); to send the output to the browser. bit of a time lag as the browser decompresses but should save you a bomb on bandwidth. check out the php manual for the full descriptions. Steev "Corin Rathbone" <corinrathbone@yahoo.com> wrote in message news:MABBIIHDNNPNALNEIKIDIEHACHAA.corinrathbone@yahoo.com... > Hi, > I read a while ago somewhere that is possible in PHP to zip or gzip or just > compress the output of a PHP file before sending it to a browser. Apparently > the browser can then uncompress this and output the finished page. This > would be very useful as one of my scripts outputs about 1.5Mb of data. Does > anybody know how to do this? Any help most appreciated. > > Regards, > Corin Rathbone > corinrathbone@yahoo.com >

« previous php.general (#58906) next »