The Internet is really just one big network, albeit the largest and most convoluted one ever created, and there are a variety of different protocols that allow communication. The most common protocol is HTTP, followed by FTP, but there are literally dozens of others, each with their own specific purpose.
PHP has a number of ways to work over a network - the most common protocols have special functions to make often-used functionality easy, but it is possible to use PHP to write any kind of data over any kind of protocol.
The topics covered in this chapter are:
What sockets are, and basic socket use
How to use sockets outside of HTTP
How to create a basic server using PHP
Creating a web server
Helpful network-related functions
HTTP-specific and FTP-specific functions
The Curl library
Want to learn PHP 7?
Hacking with PHP has been fully updated for PHP 7, and is now available as a downloadable PDF. Get over 1200 pages of hands-on PHP learning today!
If this was helpful, please take a moment to tell others about Hacking with PHP by tweeting about it!
Next chapter: Sockets >>
Previous chapter: Next chapter
Jump to:
Home: Table of Contents
Copyright ©2015 Paul Hudson. Follow me: @twostraws.