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 ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
C ontents<br />
Credits<br />
F oreword<br />
xiii<br />
xvii<br />
Chapter 1 — Introduction 1<br />
Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1<br />
H o w <strong>to</strong> Read This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2<br />
W eb <strong>Scraping</strong> Defined . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2<br />
Applications of W eb <strong>Scraping</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3<br />
Appropriate U se of W eb <strong>Scraping</strong> . . . . . . . . . . . . . . . . . . . . . . . . . 4<br />
Legality of W eb <strong>Scraping</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4<br />
Topics Co vered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4<br />
Chapter 2 — HTTP 7<br />
Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8<br />
GET Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9<br />
Ana<strong>to</strong>my of a URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10<br />
Query Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11<br />
POST Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12<br />
HEAD Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br />
Responses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br />
H eaders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15<br />
Cookies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15<br />
Redirection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16