Re: note: [PHP] ob_get_length() returns uncompressed buffer length (after ob_start('ob_gzhandler'))
| From: | Marek Kilimajer | Date: | Thu, 23 Oct 2003 12:41:56 +0000 |
| Subject: | Re: note: [PHP] ob_get_length() returns uncompressed buffer length (after ob_start('ob_gzhandler')) | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-167259@lists.php.net to get a copy of this message | ||
One option I can think of would be to handle the compression in your code:
<?php
ob_start();
print "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; // 30 a's
print "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; // 30 b's
print "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; // 30 a's
$output=gzcompress(ob_get_contents());
$ob_get_length=length($output);
header('Content-Length: '.$ob_get_length);
ob_end_clean();
?>
daniel hahler wrote:
Hallo PHP-general list, on Wed, 22 Oct 2003 23:07:06 +0200 I already wrote: dh> Hallo daniel, don't want to talk only to myself.. this is for everyone.. :)