PHP code example of yungangunite / websocket-server-sdk
1. Go to this page and download the library: Download yungangunite/websocket-server-sdk 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/ */
yungangunite / websocket-server-sdk example snippets
use YG\WSServer\YGWSClient;
$client = new YGWSClient(
'your_app_id',
'your_app_secret',
'http://your-server' // 可选,默认为 http://your-server
);