Re: Gzipped output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux