Session Timeouts

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Re: Session Timeouts

Postby WiZARD » Wed Jul 24, 2002 11:24 pm

Ruckus wrote:is there such a thing in PHP ?

i have a member site, and would like people who have signed in and then idle for, say 20 mins, to be automatically logged out (well for their session to expire)


Cant find anything in the documentation, can anyone help or suggest anything ?

Many Thanks.

Hi!
1You can use cookie session sets timeout
http://ua2.php.net/manual/en/features.cookies.php

2Output buffer (if your PHP is 4.1.x or higher)
http://ua2.php.net/manual/en/ref.outcontrol.php

3session-cache-expire(experimental)
http://www.php.net/manual/en/function.s ... expire.php

nike
New php-forum User
New php-forum User
Posts: 7
Joined: Fri Sep 06, 2002 7:59 am
Location: Ukraine
Contact:

Postby nike » Fri Sep 06, 2002 8:05 am

Hello Ruckus!

you can use next code to set up cookie lifetime
SetCookie ('ftype','TYPE1',time()+$COOKIE_LIFE);
where $COOKIE_LIFE is in seconds.

Best regards!


Return to “PHP coding => General”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 2 guests