PHP Classes

File: EncodeExample.php

Recommend this page to a friend!
  Classes of Ujah Chigozie peter  >  PHP HTTP gzip Response Encoding  >  EncodeExample.php  >  Download  
File: EncodeExample.php
Role: Example script
Content type: text/plain
Description: Example
Class: PHP HTTP gzip Response Encoding
Compress the output of a Web request PHP script
Author: By
Last change:
Date: 2 years ago
Size: 312 bytes
 

Contents

Class file image Download
<?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');