PHP Classes

PHP HTTP gzip Response Encoding: Compress the output of a Web request PHP script

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 74 All time: 10,123 This week: 138Up
Version License PHP version Categories
encodecloseconnectio 1.0.0GNU General Publi...5HTTP, PHP 5, Compression


This class can compress the output of a Web request PHP script.

It can start capturing the output of the current HTTP request.

The class can compress the whole script output using the gzip compression method and outputs the compressed output with the necessary headers to tell the user browser to decompress it on the browser side.

Picture of Ujah Chigozie peter
  Performance   Level  
Name: Ujah Chigozie peter <contact>
Classes: 21 packages by
Country: Nigeria Nigeria
Age: 32
All time rank: 215110 in Nigeria Nigeria
Week rank: 78 Up3 in Nigeria Nigeria Up
Innovation award
Innovation award
Nominee: 9x


$encode = new Encode($_SERVER['HTTP_ACCEPT_ENCODING']);
        <h3>Hello world</h3>

        <p>This will be encoded</p>
<?php $encode->closeConnection(ob_get_contents(), 200, 'HTML');

  Files folder image Files  
File Role Description
Plain text file Encode.class.php Class Endcode php class
Accessible without login Plain text file EncodeExample.php Example Example

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:10,123
This week:138Up