htmanning has asked for the wisdom of the Perl Monks concerning the following question:
The cookies get set like this:local(@getcookies) = split (/; /,$ENV{'HTTP_COOKIE'}); local(%cookies); foreach(@getcookies){ ($ckey, $cval) = split (/=/,$_); $cookies{$ckey} = $cval; } $username = $cookies{'reguser'}; $password = $cookies{'regpass'}; $regtype = $cookies{'regtype'}; $login = "Login" if ($username && $password && !$logout); }
I need to read the date and based on the date force everyone to sign in again so the cookie is set again. Thanks.$expires=&calc_cookie_expires(-1); &write_cookies; sub write_cookies{ print "Set-Cookie: reguser=$username; expires=$expires; path=/;\n" +; print "Set-Cookie: regpass=$password; expires=$expires; path=/;\n" +; print "Set-Cookie: regtype=$regtype; expires=$expires; path=/;\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading cookie expired date
by CountZero (Bishop) on Apr 08, 2012 at 10:45 UTC | |
by htmanning (Friar) on Apr 08, 2012 at 19:29 UTC | |
|
Re: Reading cookie expired date
by Anonymous Monk on Apr 08, 2012 at 11:06 UTC | |
|
Re: Reading cookie expired date
by Anonymous Monk on Apr 08, 2012 at 21:02 UTC |