note 39595 modified in ref.curl by danbrown
| From: | danbrown@php.net | Date: | Sun, 17 May 2009 19:43:12 +0000 |
| Subject: | note 39595 modified in ref.curl by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155256@lists.php.net to get a copy of this message | ||
You can request (and have deflated for you) compressed http (from mod_gzip or ob_gzhandler, for
instance) by using the following:
<?php
curl_setopt($ch,CURLOPT_ENCODING , "gzip");
?>
This seems to work fine with the latest php (4.3.4) curl (7.11.0) and zlib (1.1.4) under linux.
This is much more elegant than forcing the Accept-Encode header and using gzdeflate on an edited
result.
--was--
You can request (and have deflated for you) compressed http (from mod_gzip or ob_gzhandler, for
instance) by using the following:
curl_setopt($ch,CURLOPT_ENCODING , "gzip");
This seems to work fine with the latest php (4.3.4) curl (7.11.0) and zlib (1.1.4) under linux.
This is much more elegant than forcing the Accept-Encode header and using gzdeflate on an edited
result.
http://php.net/manual/en/ref.curl.php