-1
Hello, I want to create an internet messaging site(SMS messenger), I have some questions:
Which languages should I use (notably I will use HTML, CSS, JS)
I’ll need to use a database?
How to instantly exchange messages, no need to reload the page.
I hope I was clear, and I await the return...
You already have SMS sending plan via web?
– Sam
No, (Whoo that be)?
– Jean Perondi
But I don’t want to text on the site (This is just the name). I really want it to work like an online messenger, where registered users exchange messages with each other (as in messenger)
– Jean Perondi
I thought it was SMS. Basically you will have to use Ajax, PHP (or other backend) and a database to save messages (e.g. Mysql)..
– Sam
Thanks for the heads-up! but with only this, the messages will be sent/received instantly, and there is no need to reload (Reload) the page?
– Jean Perondi
That’s basically it. JS can check from time to time if there is a new message and show to the recipient via Ajax.
– Sam
So that means I should use the "setInterval(checkarDados(),1000)" where the chekarDados() function will import messages from the database from time to time?
– Jean Perondi
That’s right. You have to see if the server supports a request every second, especially if you have dozens of users using the system at the same time. Seria
setInterval(checkarDados,1000)
(without the function parentheses).– Sam
Thank you, you are helping me a lot! but to make the import I must use the Xmlhttprequest API?
– Jean Perondi
Yes, Ajax uses Xmlhttprequest
– Sam
Ball show! thank you very much
– Jean Perondi