About RKS

RKS is a technology, website design and marketing firm with offices in New York and Arizona.

RKS works with home, small business, academic and corporate clients onsite or remotely in 26 states and 5 countries.

Online Client Center

Domain Registration

.

PHP Compression

What this wonderful script does, is compress your html and web pages every time it's loaded onto a browser. If it's not already obvious, you must be certain that you use PHP for your web pages and that your server supports it at least.

Pre-flight Checklist

You need to check your server to be sure that the version of PHP installed on your sever is extended with the zlib module.

To do this, simply open Notepad and type the following:

<?php
phpinfo();
?>

Save the file as phpinfo.php and then upload it to your website. Visit the page you uploaded, and continue below:

Now we need to search for a specific module named zlib. Do this by pressing Control+F and search for zlib on the page. It will look similar to the image below:

zlib Compression

If you see something similar to the above box, you are ready to implement it into your site. If you do not see the above box, or one similar to it, please call your web hosting company and ask them if they can install it for you. (You can point them to this page so they know what you are trying to do)

Implementation

It is just as easy to implement it onto your website! Simply add the following code to the top of every PHP page you would like compressed, YES, it is that easy!

<?php
ob_start( 'ob_gzhandler' );
?>
<html>
<head>
<title>My Compressed Page</title>
</head>
<body>
<p>This web page is now COMPRESSED!</p>
</body>
</html>

Contact RKS

(800) 420-6836 sales@redkeysolutions.com
New York - (914) 930-6872
622 Rushmore Ave Suite 200
Mamaroneck, NY 10543

View Map

Arizona - (602) 281-3250
1753 E Broadway Rd Suite 101-255
Tempe, AZ 85282

View Map

More contact options - Click Here