Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An example PHP chat app
branch: master

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"));
Something went wrong with that request. Please try again.