Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webbased chat in php without using database or file

I am trying to implement a realtime chat application using PHP . Is it possible to do it without using a persistent data storage like database or file . Basically what I need is a mediator written in PHP who

  1. accepts messages from client browsers
  2. Broadcasts the message to other clients
  3. Forgets the message
like image 401
Sethunath K M Avatar asked Jul 17 '12 05:07

Sethunath K M


1 Answers

You should check out Web Sockets of html5. It uses two way connection so you will not need any database or file. Any chat message comes to the server will directly sent to the other users browser without any Ajax call. But you need also to setup web socket server.

Web sockets are used in many real time applications as well. I am shortly planing to write full tutorial on that. I will notify you.

like image 118
Rupesh Patel Avatar answered Oct 13 '22 16:10

Rupesh Patel