How to enable gzip compression using PHP Simple HTML DOM Parser

Posted by brant on Stack Overflow See other posts from Stack Overflow or by brant
Published on 2010-05-26T16:08:33Z Indexed on 2010/05/26 16:11 UTC
Read the original article Hit count: 322

Filed under:
|
|

I have tried a few things to enable gzip compression using PHP Simple HTML DOM Parser but nothing has seemed to work thus far. Using ini_set I've manged to change the user agent, so I figured it might be possible to also enable gzip compression?

include("simpdom/simple_html_dom.php");
ini_set('zlib.output_compression', 'On');   
$url = 'http://www.whatsmyip.org/http_compression/';
$html = file_get_html($url);
print $html;

The website above tests it. Please let me know if I am going about this the wrong way completely.

© Stack Overflow or respective owner

Related posts about php

Related posts about dom