Chapter 10. PHP and Sockets

  • Socket Basics

  • Creating a Server

  • Creating a Client

In this chapter you will explore the fascinating and sometimes confusing world of sockets. Sockets must be one of the most underused components in PHP. Today you’ll take a look at how to create a server to which a client can connect, how to connect to a server from a client using sockets, and how to process information on the server and send it to the destination client.

Believe it or not, you have been using sockets the entire time you’ve been programming in PHP. The server is the HTTP server that you connect to, and the client is the Web browser you are using to connect to the server. This is a single client/server relationship.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset