You are here: Re: how to automatically logout users from my site « PHP Programming Language « IT news, forums, messages
Re: how to automatically logout users from my site

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация