Thread cookies (31 answers)
Opened by Gast at 2004-05-13 22:50

jemand
 2004-05-17 19:48
#2456 #2456
User since
2004-05-14
231 Artikel
BenutzerIn
[default_avatar]
jippip!!!
so gehtz:
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
25
26
27
28
29
30
31
32
33
34
35
#!Perl -w
##zusatz

use CGI::Carp qw(fatalsToBrowser);
use CGI qw/:all/;
$q = CGI->new();

my $kekswert = readc('keks');
setc('keks', 'Dies_ist_der_kekswert', 'Keksausgabeseite', '<h1>Hallo</h1><br>der wert des kekses der von dieser seite gesetzt wurde ist:<br>'."$kekswert");

sub readc(){
 my $cname = shift;
 my $read = $q->cookie("$cname");
 return $read;
}
sub setc() {
my $cname = shift;
my $cvalue = shift;
 my $stitel = shift;
 my $ausg = shift;
 my $cookie = $q->cookie(-name=>"$cname",
                        -value=>"$cvalue"
                        );
 print header(-type=>'text/html',
              -cookie=>$cookie
              );
 print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 //EN">';
 print '<html>';
 print '<head><title>'."$stitel".'</title>';
 print '</head>';
 print '<body>';
 print "$ausg";
 my $end =  '</body></html>';
 print $end;
}


kann die selbe seite eigentlich mehrere cookies(mit verschiedenen namen) setzen oder immer nur einen??\n\n

<!--EDIT|jemand|1084809000-->
print uc 'i',chr(29*4).q+'s +.++($_=q-m-),++$_;
print chr for 116,$_[0],97,$_[0],98;
print 'ug,',chr(), scalar reverse qq?!erutaef a s'ti?;

View full thread cookies