A chat app using Websocket with Ratchet (not using NodeJS)
PHP JavaScript CSS
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
public
src/MyApp/WebsocketServer
.gitignore
README.md
composer.json
composer.lock

README.md

Chat app using just PHP and WebSocket

Instalation

To start, do as follows:

  • give execution permition to the bin websocket server, like so: $ chmod +x ./bin/websocketserver
  • run $ composer install
  • run $ bin/websocketserver 8888 to start the websocket server at the port 8888 (the default port)
  • run $ php -S localhost:8000 -t ./public to start a webserver in PHP at port 8000
  • open the project in the browser using the url you configured (http://localhost:8000/) and login in the chat

Note: to test the interaction, use a different tab in the browser and login with a different username :)

Warning

if you change the port, you also have to change it in the JS file at public/js/app.js

Using

  • PHP
  • Ratchet (php websocket server)
  • Twitter Bootstrap