I've got a login process, that once a user logs into the website, the ip address is recorded. So when the browser is closed, and re-opened, it checks against the session table, finds the ip address, and keeps the user logged in. If the ip address is not found, the user must log in again. When the user logs out, it deletes the user's ip address.
I am really trying to find all members who are logged into the website. If I keep them logged in even when they close the browser, then the online count will be inaccurate. But I don't want to log them out of the game, if they are just sitting in the game not doing anything.
So once they log in, they stay logged in until they either close the browser, or log off.
Logging off deletes the ip address from the sessions table.
Closing the browser does ........................
Does anyone have any ideas how I can go about doing this?