Menu
gzip website

Compress PHP Website With GZIP

PHP, Tech-Byte By Aug 06, 2013 1 Comment

gzip website

Compress Website with GZIP

I was checking some websites yesterday and i saw they took too much time to load. And i have to wait till website opens and it was just horrible. So i thought why people dont use the gzip which will help them to make their website perform faster. So here i am giving a simple script which will help you to make your php page gzip.

<?php
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start();
?>

You can use the above code and check your page at below link. Just enter the url

http://www.gidnetwork.com/tools/gzip-test.php

May be it will help you all. Thank You

~~~~~ Happy Coding ~~~~~

Author

Hello i am Vivek Moyal PHP developer and writes tutorials for students and beginners. Love to explore new cities

1 Comment

Leave a comment

Your email address will not be published. Required fields are marked *