News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
An Object-based Approach to HTTP Compression in PHP
April 17, 2006 @ 13:06:46

DevShed has posted part two of their series on speeding up your page load times with HTTP compression, this time looking at a more object-oriented approach to handling the data you want to compress.

Over the first tutorial of this series, I developed some hands-on examples, aimed at illustrating how "Gzip" encoding can be used within PHP scripts to compress the output generated by dynamic PHP pages. After transferring the encoded data to the client, contents are uncompressed and finally displayed on the browser.

By the end of this article, you should have the appropriate knowledge for building a simple data compressor class, in addition to using HTTP compression for reducing the download time of object-generated web pages.

They start with the creation of a simple data compression class, with functions to see if the browser supports gzip encoding and to get/send/compress the actual data. With the sample class created, they put it to the test with a more real-world example - echoing out user information from a MySQL database.

0 comments voice your opinion now!
gzip compression buffer output object-oriented gzip compression buffer output object-oriented


blog comments powered by Disqus

Similar Posts

DevShed: Using HTTP Compression in PHP - Make Your Web Pages Load Faster

Kevin Schroeder's Blog: fatal: The remote end hung up unexpectedly

Ilia Alshanetsky's Blog: 5.2.1 RC3 Released for testing

Matthew Weier O'Phinney: Testing Code That Emits Output

NETTUTS.com: Can You Hack Your Own Site? A Look at Some Essential Security Considerations


Community Events





Don't see your event here?
Let us know!


release composer opinion artisanfiles series tool conference framework list interview library voicesoftheelephpant symfony introduction podcast language laravel security community version

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework