Content Encoding

If you are unfamiliar with content encoding, see “Content Encoding" in Chapter 8 for more information. To enable it when using pecl_http, the ' compress’ request option must be set to true.

Note that this requires libz support to be enabled. You can check for this by executing the phpinfo function within a PHP script or running php - ri http from command line. If libz support is not enabled, the technique detailed in Chapter 8 for handling encoded content can be used on the return value of the request object’s getResponseBody method.


© pecl_http PECL Extension — Web Scraping

>>> Back to TABLE OF CONTENTS <<<
Category: Article | Added by: Marsipan (31.08.2014)
Views: 379 | Rating: 0.0/0
Total comments: 0
avatar