Chat as php and ajax in real time [duplicate]

-1

I have a chat file. In it are all the conversations of the users. I want when this file is modified without refreshing the page, the content shows the user. It is possible

    
asked by anonymous 06.07.2017 / 20:35

1 answer

1

Yes it is possible through AJAX .

For a simple chat version you can make a javascript block that makes an AJAX request to the X database in X seconds through the setTimeout function and gets the conversations only from certain date / time. Whenever you get information added by javascript to the chat window. The php page that receives the request and returns the data must be able to return only the data to a user based on the parameters received.

    
06.07.2017 / 20:45