Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Session Timeouts

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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
User avatar
WiZARD
Moderator
Moderator
 
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

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!
nike
New php-forum User
New php-forum User
 
Posts: 7
Joined: Fri Sep 06, 2002 7:59 am
Location: Ukraine


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 9 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.