Learn how to automate the Web with PHP.Are you integrating with another web site but an API is not available? Does their API not provide what you need? Web scraping is a time-honored technique for collecting the information you need from a web page. In this book, you’ll learn the various tools and libraries available in PHP to retrieve, parse, and extract data from HTML.The Web has come a long way in the last ten years. Web Scraping with PHP, 2nd Edition includes updates to the techniques of the first edition to account for modern PHP 7 based libraries written to more easily interact with web data. Whether you use plain PHP with cURL or a popular framework like Zend Framework or Symfony, this book is full of examples showing how to use the classes and functions available. Topics covered include:HTTP requests and responsesPHP’s HTTP Stream wrapperUsing the cURL extensionWorking with the pecl_http extensionParsing responses with GuzzleZend Framework’s HTTP classesAn overview of Symfony’s libraries for web automationWriting a client from scratchExtensions for parsing and tidying XML and HTMLUsing regular expressions ... and more. Written by PHP professional Matthew Turland, this book builds on his expertise in creating custom web clients.
Author: Matthew Turland