03.02.2014 Views

php|architect's Guide to Web Scraping with PHP - Wind Business ...

php|architect's Guide to Web Scraping with PHP - Wind Business ...

php|architect's Guide to Web Scraping with PHP - Wind Business ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

pecl_http PECL Extension ” 55<br />

N ote that this requires libz support <strong>to</strong> be enabled. You can check for this by executing<br />

the phpinfo function <strong>with</strong>in a <strong>PHP</strong> script or running php -ri http from command<br />

line. If libz support is not enabled, the technique detailed in Chapter 8 for<br />

handling encoded content can be used on the return value of the request object’s<br />

getResponseBody method.<br />

Cookies<br />

<br />

• Like cURL, pecl_http allo ws cookie data <strong>to</strong> be specified manually. U nlike<br />

cURL, pecl_http handles most of the formatting for you. Simply specify an

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!