rule69 Posted May 10, 2008 Share Posted May 10, 2008 Does any1 know how i can get to show the compression rate of the page as a percentage eg: GZIP: 60% or something like that.. i wana print this at the bottom of my pages thanks Quote Link to comment https://forums.phpfreaks.com/topic/105061-show-gzip-compression/ Share on other sites More sharing options...
DeanWhitehouse Posted May 10, 2008 Share Posted May 10, 2008 would that not be a maths problem, Quote Link to comment https://forums.phpfreaks.com/topic/105061-show-gzip-compression/#findComment-537802 Share on other sites More sharing options...
DarkWater Posted May 10, 2008 Share Posted May 10, 2008 How are you compressing it in your script? Quote Link to comment https://forums.phpfreaks.com/topic/105061-show-gzip-compression/#findComment-537804 Share on other sites More sharing options...
rule69 Posted May 10, 2008 Author Share Posted May 10, 2008 Am using this code: <?php ini_set('zlib.output_compression_level', 5); ?> at the top of my pages and flush it at the end thats all .. some sites can show you how much your page has been compressed ... ??? Quote Link to comment https://forums.phpfreaks.com/topic/105061-show-gzip-compression/#findComment-537807 Share on other sites More sharing options...
BlueSkyIS Posted May 10, 2008 Share Posted May 10, 2008 Am using this code: <?php ini_set('zlib.output_compression_level', 5); ?> at the top of my pages and flush it at the end thats all .. some sites can show you how much your page has been compressed ... ??? (page size after gzip/page size before gzip)/100 Quote Link to comment https://forums.phpfreaks.com/topic/105061-show-gzip-compression/#findComment-537814 Share on other sites More sharing options...
rule69 Posted May 10, 2008 Author Share Posted May 10, 2008 yes i see what u mean but how ill i get the page size after and before? Quote Link to comment https://forums.phpfreaks.com/topic/105061-show-gzip-compression/#findComment-537817 Share on other sites More sharing options...
BlueSkyIS Posted May 10, 2008 Share Posted May 10, 2008 filesize()? Quote Link to comment https://forums.phpfreaks.com/topic/105061-show-gzip-compression/#findComment-537819 Share on other sites More sharing options...
rule69 Posted May 10, 2008 Author Share Posted May 10, 2008 <? $emm = $_SERVER["PHP_SELF"]; $size = filesize("./$emm"); "<br/>"; echo $size; ?> that?? but how will i get the gzipped out filesize?? Quote Link to comment https://forums.phpfreaks.com/topic/105061-show-gzip-compression/#findComment-537822 Share on other sites More sharing options...
rule69 Posted May 11, 2008 Author Share Posted May 11, 2008 Any1? i would really be greatful if some1 could fill me in how to get the compressed filesize.. Quote Link to comment https://forums.phpfreaks.com/topic/105061-show-gzip-compression/#findComment-538156 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.