Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
This is basic client server stuff. Server to capture/store messages and serve the data up to clients. Just make an ajax client that sends to server. Use a time to determine if message is already sent. Have data on server die after a certain amount of time. This could be done with db on webserver. Or write a server that runs on a server to do realtime messaging rather than stored.
Client-> send message
Server<- recieve
Server<- resend message to all clients except source -
stop68025yWith php you have to use an pull based system Like @Demolishun proposed. But i wouldnt delete the messages.
-
A lot of chat systems are either using or inspired by IRC/XMPP, both of which are publically documented (more or less successfully, since implementation details differ) and have multiple open source servers and clients that you can inspect if you want to see how actual systems are doing it. (IRCv3 is doing some cool stuff, IMO.) Then, you can take what you've learned and do what you want with it.
-
@M1sf3t I know some IRC servers log things so they can turn people in who break the law. Or to sort through for banning.
-
@Demolishun i did that too, but it was very amateur.i did send data using ajax to php server and then save the data in a database and get back the data and stores it in a json file and then read it via js and i made the set-interval method with 1 second gap. Then display it on the web. But didn’t work as it should be
Related Rants
I’m just thinking of building an online chat system. It’s like a clone version of discord but in my way and I don’t really have that knowledge about creating chat systems.
My question is how chat systems are made (I did use google and I didn’t find anything useful) i need someone to explain how a chat system works
question
php
javascript