An example PHP chat app
JavaScript PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
css
eshq
include
js
README.md
index.php

README.md

EventSource HQ PHP Example

This is a small example chat application using EventSource HQ to push messages to the clients.

To install on Heroku:

git clone git://github.com/eshq/chat.git
cd chat
heroku create
heroku addons:add eshq
git push heroku master

The app comes with an ESHQ class for general use when using EventSource HQ from PHP.

Usage:

$eshq = new ESHQ();

// Get a new socket_id for connecting to a channel
$token = $eshq->open(array("channel" => "my-channel"));

// Post a message to a channel
$eshq->send(array("channel" => "my-channel", "data" => "My message"));