How to create a bot in my website that checks if the user is really online or offline and update his status in the database : <p>U want the bot ro check every 30 seconds to every single user if they are really online and offline by sending a request and if the bot dont get any respond after 20 sexonds they will update the status on the satabase ro offline. 
Like 
  $con->query("UPDATE users SET status='offline' WHERE username='$username');
I want the bot to check on all users online. Offline users dont need to be checked. It doesnt need to ne a super modded bot. I just need the simplest form of a bot that can perform the following actions. </p>
