Thread Perl Problem Code: PHP Code Umschreiben (24 answers)
Opened by Gast at 2006-02-19 09:40

zeus75
 2006-02-21 07:59
#6933 #6933
User since
2006-02-19
35 Artikel
BenutzerIn
[default_avatar]
moin,

da hast Du Recht.. hier der komplette Code!

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
sub logout{
 my ($f) = @_;


 
 # Cookie-Sache
 my @cookies;
 for(qw/logged modlogin ivadmin PHPSESSID/){
    my $cookie = CGI::cookie(-name => $_,
                                 -value => $f,
                                 -expires=>'Wed, 2-Jan-1987 00:00:00 GMT',
                                 -path=>'/',);
    push(@cookies,$cookie);
 }
 print CGI::header(-cookie => [@cookies]);
}

if(defined($f) && $f eq 'logout'){
 logout($f);
}
if (length ($ENV{'QUERY_STRING'}) > 0){  
     $buffer = $ENV{'QUERY_STRING'};  
     @pairs = split(/&/, $buffer);  
     foreach $pair (@pairs){  
          ($name, $value) = split(/=/, $pair);  
          $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;  
          $GET{$name} = $value;  
     }  
}  
 
if($GET{'f'} eq 'logout'){    
  logout($GET{'f'});  
}


gruss

View full thread Perl Problem Code: PHP Code Umschreiben