1
Friends, is there a simple script in php (or some other solution for linux php/mysql server) to know how many users are online on the site? I read that websocket is good for chats. In my case, it’s not chat or anything complex no. Just know even something like:
"xx users online at this time".
Also doesn’t need to be every second, hehehe, but like, every 1 minute or the best average between time and no-overhead server.
This issue of not overloading the server with requests is important. I wanted to know if you have any simple solution that requires as little of the server and data transfer as possible (I’m using shared hosting for now). The expectation is to already have a script that can meet in the future a huge demand of visitors at the same time without overloading the server (when it comes to this, I already hope to be with dedicated server).
Any help is valid! Thank you very much!
Has this tutorial which can assist. Each new visit, this code stores visitor data and removes "old" records. Then it captures the total using the "sql itself"
– Valdeir Psr