Session Timeouts

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

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

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
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";
Image

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

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!
Bereza Nikita
Rapid Internet Development Department
E-mail: nike@alarit.com
Alar Information Technologies,
URL: http://www.alarit.com

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Baidu [Spider] and 3 guests