Posted by Jonas Werres on 01/20/08 11:16
> You could save the username as a cookie and set a expiry time e.g
> setcookie("username", "user", "/", "EXPIRY TIME");
>
> Then for each page they load do a setcookie to keep it refreshed with
> the timelimit.
Yeah great. Or you do something that's not an enormous security hole,
since cookies can be freely created and edited by the user.
Running PHP scripts without the context of an HTTP request is only
possible by using cronjob s or similar things.
So the only thing you can do is saving timestamps of last activity (NOT
IN COOKIES!) and look every minute or so if there are expired ones.
If you would tell us what you are planing to do, we could tell you why
you don't want to do that.
[Back to original message]
|