How to create a socket server in PHP

by endyourif | March 2, 2009 at 02:26 pm
1046 views | 0 Recommendations | 0 comments


Ever want to build a chat application or perhaps even a game? If so, a socket server will help you get started. Once you understand the underlying functionality of creating the server, enhancing it is just as easy.



The way a socket server works is, it will be running continously and waiting for a client to connect to it. When a client connects, our server will add it to our list of clients and begin waiting for messages from that client.



Without further adieu, here is the full source code:



Continue reading How to create a socket server in PHP


Advertisement
Rachel Nixon
Rachel Nixon
flagged this story as Needs Improvement

at 14:40 on March 2nd, 2009

endyourif, I wasn't sure what was newsworthy in this story. News should always be about posting current stuff - new things you've discovered. Please review What Makes News News. It can really help ify ou follow the old "W5" news formula -- making sure you have answered the questions: Who? What? Where? When? And Why? (You might want to check out our J-Tips for more help.)

Comments (0)

This story was created over 3 months ago, the comment thread is now closed.

closeSign in to NowPublic

is reporting from