Page 1 of 1

Timed Out Logout

Posted: Mon Apr 06, 2009 7:51 am
by akash_msrit
hi friends,
i made a login page, and i made a logout button too, but i want to make a timed logout, i mean after 5 min for example the user should logout automatically. i mean i should log out from inactive web page.

and another problem i am facing is,

i have a login web page, for this web page i made all validations .
the thing is i should block parallel logins using PHP.

my question is :

How to block parallel login? How can I block multiple login attempts in to a single account, when that user have already logged in? Like... Yahoo/Hotmail email accounts...

friends i f u have existing code or suggestions for this problem please forward.

Best Regards
Akash

Re: Timed Out Logout

Posted: Mon Apr 06, 2009 1:56 pm
by John Cartwright
If you want to redirect your users after 5 minutes of inactivity then you could either use a setTimeout() on javascript, or a meta redirect.

The javascript redirect would look function like

Code: Select all

setTimeout(function() { window.location = '/path/to/logout.php'; }, 30000);
or a meta redirect

Code: Select all

<meta http-equiv="refresh" content="300;url=/path/to/logout.php">

Re: Timed Out Logout

Posted: Mon Apr 06, 2009 11:10 pm
by akash_msrit
friends thank you for your valuable response i will try this.

Best Regards
Akash