Example code from my talk about adding realtime functionality to PHP applications using Node and Redis. This code assumes you have a php 5 webserver running at http://localhost, with the contents of this repository. To run the application:
Here are some suggestions for getting Node and its package manager, npm, up and running.
https://gist.github.com/isaacs/579814
You will need to install two packages using npm:
> npm install socket.io
> npm install redis
http://redis.io/topics/quickstart
path-to-redis/src > ./redis-server
> node sync.js