9. Networking with PHP
The vast bulk of what PHP is used to do is based upon taking information from the server (like a database or a text file) and sending it to the client (the end user’s Web browser) or vice versa. But PHP also supports a slew of features for the purpose of interacting with other Web sites, communicating with other servers, and even FTP’ing files. In this chapter, I’ll discuss and demonstrate a couple of network-related PHP functions and capabilities.
In the first example, you’ll see how to read data from another Web site as if it were any old text file. In the second, a URL validator will be created (a tool for checking if a link is still good). In the third section of the chapter, you’ll learn how to identify from what ...
Get PHP 5 Advanced: Visual QuickPro Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.