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

Gonzalo Ayuso's Blog:
Real time notifications with PHP
Mar 16, 2011 @ 13:46:23

In a new post Gonzalo Ayuso about a system he's developed to create real-time notifications for PHP applications using a mix of PHP and javascript (jQuery).

Real time communications are cool, isn't it? Something impossible to do five years ago now (or almost impossible) is already available. Nowadays we have two possible solutions. WebSockets and Comet. [...] I prefer to use comet (at least now). It's not as good as websockets but pretty straightforward ant it works (even on IE). Now I'm going to explain a little script that I've got to perform a comet communications, made with PHP.

His little sample application detects when a user has clicked on a link by subscribing to an event and using the javascript callback to send the message of a click event and wait for a response. You can find the complete code for the example over on github.

tagged: notification realtime comet javascript jquery tutorial

Link:

ThinkPHP Blog:
Comet in conjunction with a PHP socket server - server-client communication
Sep 02, 2008 @ 13:41:55

In a new post to the ThinkPHP blog today there's a look at combining Comet with PHP to make a simple method for the client to talk back to the server outside the usual methods.

If a couple of users have opened the application there are already some hundred or thousand requests per second. The outcome of this is a big load for your server and a highly increased traffic - your server will in a senseless way be overloaded. In conclusion, our problem is the enormous amount of polling without knowing whether the server really wants to send a new push. Let's turn the initial situation around. And we get the solution to our problem: Comet.

With Coment, the model changes and the request is "cached" on the server-side automatically in a single Comet instance. Coordinate this with another recommendation of theirs, a PHP socket server, and you can do some pretty interesting things.

tagged: communication socket server comet ajax push pull

Link:

PHPClasses.org:
File upload progress meter for PHP 4, at last!
Dec 21, 2006 @ 16:46:00

With the release of PHP 5.2 and a new feature, the file upload hooks useful for making an upload progress meter, PHP 4 users have been feeling a little left out. Well, come into the light PHP4ers - PHPClasses has just what you need - two patches to give you the same functionality.

Since I wanted to use this upload progress meter extension under PHP 4, I had to find an alternative solution. I decided to port the patch that adds hooks to monitor upload progress to make it run under PHP 4.

These two patches work for different versions:

He also links to a few other resources of use to file uploaders out there:

tagged: file upload progress php4 php5 meter comet patch ajax file upload progress php4 php5 meter comet patch ajax

Link:

PHPClasses.org:
File upload progress meter for PHP 4, at last!
Dec 21, 2006 @ 16:46:00

With the release of PHP 5.2 and a new feature, the file upload hooks useful for making an upload progress meter, PHP 4 users have been feeling a little left out. Well, come into the light PHP4ers - PHPClasses has just what you need - two patches to give you the same functionality.

Since I wanted to use this upload progress meter extension under PHP 4, I had to find an alternative solution. I decided to port the patch that adds hooks to monitor upload progress to make it run under PHP 4.

These two patches work for different versions:

He also links to a few other resources of use to file uploaders out there:

tagged: file upload progress php4 php5 meter comet patch ajax file upload progress php4 php5 meter comet patch ajax

Link:

PHPClasses.org:
Responsive AJAX applications with COMET
Sep 27, 2006 @ 18:44:10

From PHPClasses.org today, there's a new article describing the combination of a few technologies - more specifically Ajax, Comet, and PHP - to create responsive applications.

This post describes an approach used to implement highly responsive AJAX applications using the COMET approach. It describes in detail how the AJAX COMET approach can be implemented in PHP.

It also discusses how HTTP compression and chunking affect AJAX response delays, as well aspects that may influence the choice between Apache 1.3.x with mod_gzip versus Apache 2.x with mod_deflate for AJAX COMET applications.

Manuel breaks the tutorial up into sections:

  • Multiple response AJAX requests
  • COMET: Multiple response AJAX request implementation
  • HTTP compression
  • Page compression delays
  • Avoiding mod_gzip dechunking
  • Apache 2.2.x with mod_deflate
For each topic, there's a bit of explaination and some links to reinforce the ideas. There's not really any code, but he does link to various classes that can help combine to meet the goal.

tagged: ajax application responsive comet apache compression multiple ajax application responsive comet apache compression multiple

Link:

PHPClasses.org:
Responsive AJAX applications with COMET
Sep 27, 2006 @ 18:44:10

From PHPClasses.org today, there's a new article describing the combination of a few technologies - more specifically Ajax, Comet, and PHP - to create responsive applications.

This post describes an approach used to implement highly responsive AJAX applications using the COMET approach. It describes in detail how the AJAX COMET approach can be implemented in PHP.

It also discusses how HTTP compression and chunking affect AJAX response delays, as well aspects that may influence the choice between Apache 1.3.x with mod_gzip versus Apache 2.x with mod_deflate for AJAX COMET applications.

Manuel breaks the tutorial up into sections:

  • Multiple response AJAX requests
  • COMET: Multiple response AJAX request implementation
  • HTTP compression
  • Page compression delays
  • Avoiding mod_gzip dechunking
  • Apache 2.2.x with mod_deflate
For each topic, there's a bit of explaination and some links to reinforce the ideas. There's not really any code, but he does link to various classes that can help combine to meet the goal.

tagged: ajax application responsive comet apache compression multiple ajax application responsive comet apache compression multiple

Link:


Trending Topics: