Re: Re: ob_gzhandler not working with 4.3.1
| From: | gamin | Date: | Tue, 08 Apr 2003 08:10:29 +0000 |
| Subject: | Re: Re: ob_gzhandler not working with 4.3.1 | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142815@lists.php.net to get a copy of this message | ||
Then what is the purpose of "ob_gzhandler" ? does it simply check if the
User-Agent supports gzip and adds the header "content-encoding: gzip" ?
> It works transparently at the end of the script, ob_get_contents()
> should return the contents of the output buffer (not how it will be).
>
That means at the end of the script i will need to compress the with
gzcompress, thus my script will become
<?
ob_start("ob_gzhandler");
?>
123
<?
$str = ob_get_contents();
ob_end_clean;
$str = gzcompress($str);
echo $str
?>
gamin.