PHPackages                             igorw/event-source - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. igorw/event-source

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

igorw/event-source
==================

A PHP 5.3 library for creating an EventSource stream.

v1.0.0(13y ago)10488.7k↓43.3%8[1 issues](https://github.com/igorw/EventSource/issues)[4 PRs](https://github.com/igorw/EventSource/pulls)2MITPHPPHP &gt;=5.3.0

Since Jul 14Pushed 8y ago4 watchersCompare

[ Source](https://github.com/igorw/EventSource)[ Packagist](https://packagist.org/packages/igorw/event-source)[ RSS](/packages/igorw-event-source/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (2)

EventSource
===========

[](#eventsource)

A PHP 5.3 library for creating an [EventSource](http://dev.w3.org/html5/eventsource/) stream.

EventSource or Server-Sent-Events is a W3C specification that defines a protocol and an API for pushing data from the server to the client. This library is a server-side implementation of this protocol.

It is designed to be transport agnostic, allowing you to use it with apache directly or with other webservers, such as mongrel2.

[![Build Status](https://camo.githubusercontent.com/5ecf8f10fd7102cb94d49d6f6d2679ed98d4684c2e591f7827d3133675a42d54/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f69676f72772f4576656e74536f757263652e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/igorw/EventSource)

Fetch
-----

[](#fetch)

The recommended way to install EventSource is [through composer](http://packagist.org).

Just create a composer.json file for your project:

```
{
    "require": {
        "igorw/event-source": "1.0.*"
    }
}
```

And run these two commands to install it:

```
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar install

```

Now you can add the autoloader, and you will have access to the library:

```
