Skip to content
Advertisement

how to my receiver is typing a message and show on my browser

i want to check the user is typing a message and want to display it in my chat box, i know setting database flag and checking it by timeinterval function, but i think it should be slow method, is there any way to check it? by the users’s machine ip/id .

Advertisement

Answer

I have found that using sockets is the only good solution for achieving that. https://wisembly.github.io/elephant.io/ .

PHP server side:

JavaScript

Socket.io server side:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement