Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

Packages

Contributors

Languages