1. Go to this page and download the library: Download flarum/realtime 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/ */
flarum / realtime example snippets
return [
// ..
'websocket' => [
]
];
return [
// .. some other instructions
// Make sure the Realtime php client uses localhost instead of the domain
// to reduce latency.
'websocket' => [
'php-client-host' => 'localhost'
]
];