PHP code example of m50 / pusher-client

1. Go to this page and download the library: Download m50/pusher-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/ */

    

m50 / pusher-client example snippets


$client = Client::create('my-app', 'us3');
$channel = $client->channel('my-channel');

while ($event = $channel->next(300)) {
    var_dump($event);
}