BioHazard has asked for the wisdom of the Perl Monks concerning the following question:
BioHazard#!C:\Perl\bin\perl.exe use strict; use CGI; my $q = CGI->new(); my $service = $q->param('service') || ''; &printCookieContent() if ($service eq 'showcookie'); sub printCookieContent { my $cookie = $ENV{HTTP_COOKIE}; my ($name, $value) = split(m/=/, $cookie, 2); print $q->header('text/html'); print "$name<br>$value"; exit; } my $cookie = $q->cookie( -name => "Testname", -value => "Testvalue", -domain => "abroxa.dyndns.org", -expires => "+10m", -path => "/cgi-bin" ); print $q->header(-type => 'text/html', -cookie => $cookie); print qq ~<a href="cookietest.cgi?service=showcookie">klick here to te +st the cookie</a>~; exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cookie expires inaccurately
by Aristotle (Chancellor) on Dec 28, 2002 at 16:26 UTC | |
|
Re: (nrd) Cookie expires inaccurately
by newrisedesigns (Curate) on Dec 28, 2002 at 15:06 UTC | |
by BioHazard (Pilgrim) on Dec 28, 2002 at 15:21 UTC | |
by poj (Abbot) on Dec 28, 2002 at 19:47 UTC | |
by newrisedesigns (Curate) on Dec 29, 2002 at 14:45 UTC | |
|
Re: Cookie expires inaccurately
by poj (Abbot) on Dec 28, 2002 at 14:47 UTC |