Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

PHPBuilder.com: Creating Real Time Applications with PHP and WebSockets

PHPBuilder.com: Creating Real Time Applications with PHP and WebSockets

On PHPBuilder.com today there’s a new tutorial introducing you to the combination of PHP and WebSockets to make real-time requests to fetch data in your application.

This article will explore the main PHP libraries used to create real time, bi-directional applications between clients and servers over WebSockets. WebSocket is full-duplex client/server communication over TCP. It is also a new feature available in browsers as a part of the HTML5 specs that allows JavaScript clients to open bi-directional socket connections to a server. [...] WebSocket connections are basically TCP socket connections that following the WebSocket rules to communicate. The WebSocket Protocol is an independent TCP-based protocol.

They introduce some of the basic concepts behind WebSockets (including an example URL) and show how to use the PHPWebSockets library to handle some sample requests. They also include some basic JavaScript to make the request to the backend PHP script and send or fetch content on the server. They also show you how to implement a simple chat server using a few other libraries like Ratchet, Elephpant.io and Socket.io.

Link: http://www.phpbuilder.com/articles/application-architecture/optimization/creating-real-time-applications-with-php-and-websockets.html
Source: http://www.phpdeveloper.org/news/21498

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Posted Lipiec 31st, 2014 in WEB and PHP Development.

Leave a response: