News Feed
Sections




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

RIAZone:
Communicating with Flex and PHP over Sockets
February 24, 2010 @ 09: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).

0 comments voice your opinion now!
tutorial flex sockets integrate


blog comments powered by Disqus

Similar Posts

SitePoint Web Foundations: Quick Tip: Install Recki-CT into a Vagrant Ubuntu Box

PHPMaster.com: Avoid the Original MySQL Extension, Part 1

Felix Geisendörfer's Blog: Learning from the CakePHP Source Code (Part 1)

SitePoint PHP Blog: Simple Captchas with PHP and GD

SitePoint PHP Blog: 6 Reasons to Move to Laravel Homestead


Community Events





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


community series update package language install tips library list opinion api introduction podcast laravel symfony framework zendserver release deployment interview

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