https://github.com/gergesshamon/sse-client
https://github.com/gergesshamon/sse-client
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gergesshamon/sse-client
- Owner: GergesShamon
- License: gpl-3.0
- Created: 2024-11-08T16:57:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-28T09:02:18.000Z (over 1 year ago)
- Last Synced: 2025-04-06T15:28:15.995Z (about 1 year ago)
- Language: PHP
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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).
## Installation
Use composer to install the library and all its dependencies:
composer require gerges/sse-client
## Example Usage
```php
$client = new SseClient\Client('https://eventsource.firebaseio-demo.com/.json');
foreach ($client->getEvents() as $event) {
var_dump($event);
}
```