Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

PHP and WebSockets chat

This is simple HTML chat with the following features:

1) Unlimited number of connections (users).
2) Every user may select his/her nickname and color.
3) There are notifications wher someone has joined or left the chat.
4) Minumum use of PHP.

How to setup it

1) You will need a wsphp server installed.
2) Setup app_path config option to point to app.php
3) Disable cron_path config option as we do not use it.

Information

Network communications are done using Websockets. WebSocket is a computer communications protocol, providing full-duplex communication channels over a single TCP connection. That is why we can read (via ws.onmessage callback) and send messages (via ws.send) using only one websocket connection. WSPHP server takes care about websocket protocol actions: handshake, encoding/decoding frames, etc. PHP role is small - it just re-sends received message to all connected users. Messages are wrapped to JSON format for convenience.

About

Simple and fast chat written with PHP using Websockets.

Resources

Releases

No releases published
You can’t perform that action at this time.