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 enough user ratingsTotal: 78 All time: 10,117 This week: 673Up
Version License PHP version Categories
encodecloseconnectio 1.0.0GNU General Publi...5HTTP, PHP 5, Compression
Description 

Author

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: 24 packages by
Country: Nigeria Nigeria
Age: 33
All time rank: 203310 in Nigeria Nigeria
Week rank: 19 Up2 in Nigeria Nigeria Up
Innovation award
Innovation award
Nominee: 11x

Example

<?php
include_once("Encode.class.php");
$encode = new Encode($_SERVER['HTTP_ACCEPT_ENCODING']);
ob_start('Encode::removeWhitespace');
?>
<html>
<bod>
    <div>
        <h3>Hello world</h3>

        <p>This will be encoded</p>
    </div>
</bod>
</html>
<?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  
 0%
Total:78
This week:0
All time:10,117
This week:673Up