Forum Moderators: coopster

Message Too Old, No Replies

ob_start('ob_gzhandler'); and compression level?

         

brakkar

12:09 am on Mar 11, 2004 (gmt 0)

10+ Year Member



Hello,
on top of my php page I put:

<?php
ob_start('ob_gzhandler');
?>

How can I set a level of compression with this code?
And how can I verify if the level is working or not?

I know about [leknor.com...] , but it is too basic and don't give the compression level.

Thanks in advance,
Brakkar

coopster

7:40 pm on Mar 11, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>>How can I set a level of compression with this code?

I don't think you are going to be able to. You should probably be using gzcompress [php.net] if you need to set the compression level. Have you read through the PHP manual pages for ob_gzhandler [php.net]? There is a note in there from the developers...

Note: You cannot use both ob_gzhandler() and ini.zlib.output_compression. Also note that using ini.zlib.output_compression is preferred over ob_gzhandler().

I'm not sure how to verify the level of compression specified actually occurred. Anyone else?