Re: send a file or stream
| From: | Curt Zirzow | Date: | Thu, 31 Aug 2006 06:36:19 +0000 |
| Subject: | Re: send a file or stream | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-241260@lists.php.net to get a copy of this message | ||
On 8/29/06, Rafael Mora <moraloco@gmail.com> 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.