A McGraw Hill Book Plug-in PHP: 100 Power Solutions
By Robin Nixon (McGraw Hill 2010, ISBN 978-0071666596)

Home | About | Buy It | Download | Contact

Select Chapter: 1  2  3  4  5  6  7  8  9 10 11 12

Chapter 10: Plug-in 72 - Curl Get Contents

Some websites don't like to be accessed by anything other than a web browser, which can make it difficult to fetch data from them with a PHP program using a function such as file_get_contents(). Such sites generally block your program by checking for a User Agent string. Therefore, to access these sites it is necessary to simulate being a browser using a plug-in such as this one.

The Figure shows the pluginphp.com home page being downloaded using this plug-in.