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 <<< | |
Views: 379 | |
Total comments: 0 | |