I know there are the event handlers onBeforeUnload and onunload, which work great 90% of the time.
But what would happen if a user who was in the system had a power cut? Would it then be down to the database that stores who is logged in to go through logging users out who havent done anything for a while?
Or could you use the PHP function 'exec' to ping the users IP address and if there is no response, log them off?
So PHP would destroy a session if a user had a powercut or otherwise left the site? I know abit about these so I could use them, but I thought they persisted for a while after the user vanished?
Bookmarks