2

I'm new to HTML 5, websocket. We are trying application like white board.Users who all are logged in that particular session can type their thoughts in white board div. It should display to all users who are logged in that session. So i tried to use Php Websocket. what all are the steps need to follow to run php Websocket on server side. Let me know further clarification.

Thanks, Dhinesh.B

1 Answer 1

1

Find some PHP classes that implement the latest Websocket protocol RFC6455. This is an example implementation that I tested and that is working just fine: https://github.com/esromneb/phpwebsocket . Copy those files to your websocket subfolder (e.g. /websocket)

The steps are:

  1. Run the server side PHP (e.g. php -q websocket.demo.php). Use a previously unused socket port.
  2. Connect to the server using a client HTML with Javascript websocket code. In your Javascript code use the port that you specified for the server (e.g. localhost/websocket/client.html)
Sign up to request clarification or add additional context in comments.

1 Comment

"Use a previously unused socket port" what socket should I use?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.