Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevArticles:
Understanding Sockets
Mar 26, 2003 @ 13:17:32

Every once and a while, there's something that you want to do on a network in PHP that there either just isn't a function for, or a resource you find (like a class) doesn't want to cooperate. It's in cases like this that you might want to check out this article from DevArticles.com.

Sockets and PHP (Part 1) talks about how you, the intrepid coder out there, can use the built in socket technology inside PHP to create connections to all sorts of different things. It starts off with an intro of what sockets are and how to use them, then quickly moves into some code for manually creating a FTP connection (yes, I know there's FTP functions in PHP, but bear with me). Basically, all this class does is connect to the remote FTP server. Sending data is a whole other story, and is probably better saved for later parts....

tagged:

Link:


Trending Topics: