I'm trying to "upgrade" my auth system from a simple insecure cookie system and looked into phpBBs method.
They have a table called sessions and when you login the data goes into it. It seems to get deleted whenever someone else goes to the page, what I'm looking for though is a way to have a table changed when someone logs in, (easy!) but changed again (to show they arn't logged in!) when they close their browser, much like setting a cookie with no time().
Is this possible?
I could run an hourly cronjob to delete all sessions, or even to delete all sessions over 10 minutes old, but that isn't really a practical solution, there must be a better way, surely!
Thanks a lot for any feedback, I've searched on php.net and tried to on here, but its not been returning any results (even for words from titles I've just looked at) for weeks. (Its not always been between 3-5am site time!)