PHP code example of gerges / sse-client

1. Go to this page and download the library: Download gerges/sse-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gerges / sse-client example snippets


$client = new SseClient\Client('https://eventsource.firebaseio-demo.com/.json');

foreach ($client->getEvents() as $event) {
   var_dump($event);
}