PHP code example of andreibu / php_websocket_client
1. Go to this page and download the library: Download andreibu/php_websocket_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/ */
andreibu / php_websocket_client example snippets
host
port
path
use PHP_WS;
PHP_WS::send(json_encode(array('type'=>'send_message_to','id'=>'1000001','msg'=>'laravel msg ')));
composer
'providers' => [
...
AndreiBu\php_websocket_client\WSServiceProvider::class,
],
'aliases' => [
...
'PHP_WS' => AndreiBu\php_websocket_client\Facades\PHP_WS::class,
],