Re: Gzipped output

From: Date: Sun, 10 Feb 2008 14:17:12 +0000
Subject: Re: Gzipped output
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-269030@lists.php.net to get a copy of this message
Jakub wrote: > That script generates a large text file to download, so I thought I > can gzip it somehow to make the downloads faster. The buffered way (to > load all the output to some $buffer and then echo > gzencode($buffer,6);) consumes too much memory. You could write it to a local file, then do: header("Content-Type: application/x-gzip"); Header("Content-Disposition: attached; filename=\"\"") passthru("gzip -c <file>"); /Per Jessen, Zürich

« previous php.general (#269030) next »