I am trying to find a method to execute some PHP code once a user closes the page. In my application, once the user closes or navigates away from the page the server will st
If you put in a ajax script that refreshes after 5-10 seconds, you can update the last updated stamp via the php file that the ajax request calls, and if its older than 10 seconds it went offline. That could certainly be a cleaner solution :-)