News Feed
Sections




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

DevShed:
An Introduction to Sockets in PHP (Part 1)
May 22, 2006 @ 08:52:52

DevShed starts a new series today with this look at some of the easier ways to work with low-level sockets in PHP.

With reference to using sockets in PHP, in this three-part series, I'll try to cover their most crucial aspects. I'll start with the basics, such as creating, opening and closing a socket. Then I will proceed to using advanced approaches, such as implementing socket servers. Of course, I'll accompany this material with numerous hands-on examples.

At the end of this series, you should be equipped with a good grounding in how to use and manipulate low-level sockets in PHP, in order to expand your existing background of network programming.

They start of at the basest level, an illustration of using the socket functions to connect to a port on the localhost. They explain each chunk of code before moving on to something slightly more complex - developing a simple web application. It's made up of two parts: the server from the previous example (taking a string and making it uppercase to return it) and the client that will send the string. This basic example is then enhanced by a "rebirth" into a class making the creation of the socket server as easy as making a new object.

0 comments voice your opinion now!
introduction socket part1 tutorial server client introduction socket part1 tutorial server client


blog comments powered by Disqus

Similar Posts

Stuart Herbert's Blog: Can You Secure A Shared Server With PHP + FastCGI?

Nicolas Grekas (on Github): Improved handling of HTTP requests in PHP

Chance Garcia's Blog: TEKX Tutorials - Best Practices & Being the Bad Guy

Pascal Opitz's Blog: An example of how to use Pimple DI with ZF 1.x

NetTuts.com: Learn to Create Interactive Drill-Down Dashboards with PHP and FusionCharts


Community Events





Don't see your event here?
Let us know!


community project list code podcast language developer wordpress release introduction interview framework threedevsandamaybe series application bugfix laravel configure library api

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework