PHP code example of smart-crowd / centrifuge-broadcaster
1. Go to this page and download the library: Download smart-crowd/centrifuge-broadcaster 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/ */
smart-crowd / centrifuge-broadcaster example snippets
'default' => 'centrifuge',
'connections' => [
...
'centrifuge' => [
'driver' => 'centrifuge',
'transport' => 'http', // or redis
'redisConnection' => 'default', // for redis transport only
'baseUrl' => 'http://myapp.exapmle:8000',
'secret' => 'f27d79a1-821f-4e3f-47b2-7cb308768c77',
'topLevelFields' => [
/**
* to implement
* http://fzambia.gitbooks.io/centrifugal/content/mixed/exclude_sender.html
* you should pass in payload `centClientId` field
*/
'centClientId' => 'client',
],
]
]