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

Kevin Schroeder's Blog:
You want to do WHAT with PHP? Chapter 1
Aug 26, 2010 @ 16:03:27

Kevin Schroeder has a new post today with an excerpt from his book "You Want to do WHAT with PHP?" - the first chapter looking at networking and socket connections.

I'm also woefully behind on blogging. So, to alleviate that I am going to post an excerpt from my upcoming book "You want to do WHAT with PHP?" Today we are going to take a look at Chapter 1.

The sample chapter talks about figuring out the host to netmask relationship relationship by parsing the IP with the ip2long and comparing that to the list of netmasks from an array. Sample code is provided as well as output for reference.

tagged: book excerpt networking sockets netmask ip

Link:

RIAZone:
Communicating with Flex and PHP over Sockets
Feb 24, 2010 @ 15:11:35

On the DZone's RIAZone there's a recent article from Ryan Stewart looking at combining PHP and Flex and get them talking to one another with the help of PHP's socket functions.

There are a number of ways to communicate between Flex and PHP but one of the more interesting is over sockets. Socket communication lets developers create near real-time communication by pushing information directly to the client. In this article you'll see the basics of how to use PHP as the socket server and connect it to a Flex application.

Using direct socket connections, the client and server communicate directly over a port and any data can be easily passed back and forth over it. This method requires that you set up a policy file for the application for security reasons before it can communicate with the PHP backend. With this in place, the rest is easy. They include the PHP code you'll need to make the socket request handler and how to return a response that the Flex application can read. Code for the Flex application side of things is included as well - a simple application that grabs a "stock price" and plots it on a graph (seen here).

tagged: tutorial flex sockets integrate

Link:

DevShed:
Emulating a Basic Web Server with Sockets in PHP
Jun 05, 2006 @ 19:35:05

DevShed has posted the third part of their "handling sockets in PHP" series today, taking things one step further than the basic TCP server from before and making a basic web server.

It's time to pay attention to the subject of this final part of the series. In this article, I'll show you how to use low-level sockets to emulate the functionality of a basic Web server on your own testing machine.

They start with a quick look back, mentioing what the simple TCP server could do and (briefly) how it worked, including its entire code. Since it was simple to extend, they create a new class, WebServer, to add the functionality it needs to response as a web server. It's made to serve up one file - a static HTML - whenever the user hits it with a request.

His simple server dosen't conform to any of the standards, but it does transmit data out over the standard port in an HTML format. It's a step in the right direction...

tagged: sockets handling part3 simple webserver static html sockets handling part3 simple webserver static html

Link:

DevShed:
Emulating a Basic Web Server with Sockets in PHP
Jun 05, 2006 @ 19:35:05

DevShed has posted the third part of their "handling sockets in PHP" series today, taking things one step further than the basic TCP server from before and making a basic web server.

It's time to pay attention to the subject of this final part of the series. In this article, I'll show you how to use low-level sockets to emulate the functionality of a basic Web server on your own testing machine.

They start with a quick look back, mentioing what the simple TCP server could do and (briefly) how it worked, including its entire code. Since it was simple to extend, they create a new class, WebServer, to add the functionality it needs to response as a web server. It's made to serve up one file - a static HTML - whenever the user hits it with a request.

His simple server dosen't conform to any of the standards, but it does transmit data out over the standard port in an HTML format. It's a step in the right direction...

tagged: sockets handling part3 simple webserver static html sockets handling part3 simple webserver static html

Link:

DevShed:
Developing an Extensible TCP Server with Sockets in PHP
May 30, 2006 @ 22:58:33

Devshed has posted part two in their series of "handling sockets in PHP", this time, with a focus on the creation of a TCP server.

Are you interested in learning how to manipulate low-level sockets in PHP? Your search has finished. This is the second part of the series “Handling sockets in PHP,” and hopefully you’ll find in it valuable material regarding the creation and manipulation of sockets with PHP, in conjunction with numerous illustrative hands-on examples that will help you build socket servers in a few easy steps.

The tutorial walks you through the simple process, looking back at the simple version they made before, looking forward at expaning it to handle multiple client requests, and creating a "socket server" class to automatically handle the creation of the socket.

tagged: sockets tutorial tcp server extensible part2 sockets tutorial tcp server extensible part2

Link:

DevShed:
Developing an Extensible TCP Server with Sockets in PHP
May 30, 2006 @ 22:58:33

Devshed has posted part two in their series of "handling sockets in PHP", this time, with a focus on the creation of a TCP server.

Are you interested in learning how to manipulate low-level sockets in PHP? Your search has finished. This is the second part of the series “Handling sockets in PHP,” and hopefully you’ll find in it valuable material regarding the creation and manipulation of sockets with PHP, in conjunction with numerous illustrative hands-on examples that will help you build socket servers in a few easy steps.

The tutorial walks you through the simple process, looking back at the simple version they made before, looking forward at expaning it to handle multiple client requests, and creating a "socket server" class to automatically handle the creation of the socket.

tagged: sockets tutorial tcp server extensible part2 sockets tutorial tcp server extensible part2

Link:


Trending Topics: