Thread Cookies: Wie mach ich das? (10 answers)
Opened by youngalcapone at 2004-02-18 19:59

esskar
 2004-02-24 18:41
#1260 #1260
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
*uraltcodeauskram"

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
sub SetCookie {
my ($name, $default, $domain) = @_;

my $cookie = cookie(
-NAME => "$name",
-VALUE => "$value",
-EXPIRES => "+2y",
-DOMAIN => "$domain",

);
my @ckyContent = split(/\n/, header(-COOKIE => $cookie));
print "$ckyContent[0]\n";
print "$ckyContent[1]\n";

return $value;
}

sub GetCookie {
my ($name, $default, $domain) = @_;

my $value = cookie($name) || SetCookie($name, $default, $domain);

return $value;
}

View full thread Cookies: Wie mach ich das?