gerges / sse-client
Server Sent Event client implementation
v1.0.1
2024-11-10 19:56 UTC
Requires
- guzzlehttp/guzzle: ^7.8
Requires (Dev)
- phpstan/phpstan: ^1.12
This package is auto-updated.
Last update: 2025-03-10 08:18:08 UTC
README
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).
Installation
Use composer to install the library and all its dependencies:
composer require gerges/sse-client
Example Usage
$client = new SseClient\Client('https://eventsource.firebaseio-demo.com/.json'); foreach ($client->getEvents() as $event) { var_dump($event); }