Get support from Xavier Media
It is currently Sun Dec 08, 2013 12:15 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Cookie Password Protection 1.1 Expire Cookie
PostPosted: Thu Jun 03, 2010 2:29 am 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Fri May 14, 2010 9:46 pm
Posts: 9
Points: 0
When using cpp_11, my cookies expire on time (I am using .1 for six minutes instead of 1 for 1 hour).

However, I would like to end session at logout or at least after all browser window are closed.

Is there a work-around to end a cookie session at logout, such as:

<?
{
session_start();
$_SESSION = array(); // destroy all $_SESSION data
setcookie("PHPSESSID", "", time() - 3600, "/");
session_destroy();
}
?>

(But this code doesn't work.)


Thank you.


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: Cookie Password Protection 1.1 Expire Cookie
PostPosted: Thu Jun 03, 2010 4:19 am 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
If you set the cookie to expire in 6 minutes and log out after lets say 2 minutes, the cookie will expire already when you log out.

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Cookie Password Protection 1.1 Expire Cookie
PostPosted: Fri Jun 04, 2010 12:36 am 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Fri May 14, 2010 9:46 pm
Posts: 9
Points: 0
Thanks...

For my purposes (allowing a user to upload a single file during a coordinated upload, I found ' $expirecookie = .0075; ' (45 seconds) to be the most useful. This, of course, would be a "coordinated upload where a company agent would grant a temporary password to the uploader.

During my testing, it appeared that the expiration time began after the user's last upload function.

Thanks again.


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Registered users: No registered users


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Portal » Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[
SEO MOD © 2007 StarTrekGuide ]