omatech / sse-client
Server Sent Event client implementation
0.1.5
2019-10-16 08:14 UTC
Requires
- php: >=5.5.0
- guzzlehttp/guzzle: ^6.1@dev
Requires (Dev)
- phpunit/phpunit: ~4
README
#PHP SSE Client
(ported from Python SSE client: https://bitbucket.org/btubbs/sseclient/)
This is a PHP client library for iterating over http Server Sent Event (SSE) streams (also known as EventSource, after the name of the Javascript interface inside browsers).
Example usage:
$client = new SseClient\Client('https://eventsource.firebaseio-demo.com/.json'); // returns generator $events = $client->getEvents(); // blocks until new event arrive foreach ($events as $event) { print_r($event); }