Welcome Guest, Not a member yet? Register   Sign In
PHP User session for only 30 mins
#1

[eluser]bleu[/eluser]
I want my user session to be only for 30 mins how can I achieve that . I am not using codeigniter session but normal PHP $_SESSION
#2

[eluser]InsiteFX[/eluser]
Code:
$sessionCookieExpireTime=1800;
session_set_cookie_params($sessionCookieExpireTime);
session_start();
#3

[eluser]bleu[/eluser]
[quote author="InsiteFX" date="1333900387"]
Code:
$sessionCookieExpireTime=1800;
session_set_cookie_params($sessionCookieExpireTime);
session_start();
[/quote]
Thanks
#4

[eluser]bleu[/eluser]
I want his php session to get over after 30 mins of inactivity other wise if he is using the website he should be logged in.

The above example does not seem to take into account the user's inactivity
#5

[eluser]Samus[/eluser]
[quote author="bleu" date="1338015616"]I want his php session to get over after 30 mins of inactivity other wise if he is using the website he should be logged in.

The above example does not seem to take into account the user's inactivity[/quote]
Then reset his session after he clicks a page or whatever. Simply by running the code above again
#6

[eluser]InsiteFX[/eluser]
You would need to use javascript with an event timer probaly to do what you want.

See this




Theme © iAndrew 2016 - Forum software by © MyBB