Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Example PHP WebSocket server and PHP WebSocket client

Based on socketo.me

Install

  1. If you don't have Composer yet, just run the following command:
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer 
  1. Checkout project from GitHub
cd <path-to-install>
git init
git remote add origin https://github.com/vakst/ws.git
git pull origin master
  1. Use the "composer install" command to install dependencies
composer install
  1. Launch web-server
php -S 0.0.0.0:80 -t www
  1. Launch ws-server
php bin/messenger-server.php

Commands

php bin/messenger-client.php get-all-users

php bin/messenger-client.php get-all-user-task=USERID

php bin/messenger-client.php send-message=USERID task=TASKID message=MESSAGE

php bin/messenger-client.php send-message=USERID message=MESSAGE

php bin/messenger-client.php send-message=all message=MESSAGE

About

Example PHP WebSocket server and client

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages