jagguy Posted July 14, 2007 Share Posted July 14, 2007 How can i detect if a user has logged off with php/mysql because they will more than likely just close the browsers. Link to comment https://forums.phpfreaks.com/topic/59901-detect-logoff/ Share on other sites More sharing options...
hackerkts Posted July 14, 2007 Share Posted July 14, 2007 Maybe you can search "user online". Link to comment https://forums.phpfreaks.com/topic/59901-detect-logoff/#findComment-297882 Share on other sites More sharing options...
cooldude832 Posted July 14, 2007 Share Posted July 14, 2007 make a cron job to run every 10-15 minuites that checks all active sessions and compares it to the database value for that user (make a bool field called loggedin) and then if they don't match switch them and you have all the users logged in. Sessions will die on browser close or after X seconds. Link to comment https://forums.phpfreaks.com/topic/59901-detect-logoff/#findComment-297889 Share on other sites More sharing options...
jagguy Posted July 14, 2007 Author Share Posted July 14, 2007 Hi, What is a cron job and how can i get a script to run on a server other than my own every 15mins. There might be security stopping this as well. Link to comment https://forums.phpfreaks.com/topic/59901-detect-logoff/#findComment-297910 Share on other sites More sharing options...
cooldude832 Posted July 14, 2007 Share Posted July 14, 2007 crontab is a unix add on that lets you execute a php script at a given time when certain Unix Timestamp values match. Thus you make a php file that does what you need and the server starts it when you set it to with crontab Link to comment https://forums.phpfreaks.com/topic/59901-detect-logoff/#findComment-297916 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.