Re: send a file or stream

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

 



Thank you very much Curt!, I'm tests right now with this. The client is not
a web browser, it is an application that calls the .php file with $_GET
params, and the app waits to receive the file compressed, this is the way I
want it to work!

I'll let u know about this. But anyway thank you

Rafa

PS: what is that ob_start though?


On 8/31/06, Curt Zirzow <czirzow@xxxxxxxxx> wrote:

On 8/29/06, Rafael Mora <moraloco@xxxxxxxxx> wrote:
> Hi!
>
> i want to send a file or output stream in a .php, but first compress it,
I
> tryed the example to compress files but how do i do to send as answer to
the
> http request??

Unlike my recent posts, this could be a candidate for using ob_*

There is no need to compress it first, just use ob_start('ob_gzhandler');

if the client supports a compression method, no special things are
needed and the content sent is compressed otherwise it is sent without
compression.

see http://php.net/ob-gzhandler for more info.

HTH,
Curt.

Curt.


[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