Hallöchen,
habe die Seiten zu einem anderen Anbieter gewechselt und nun fängt der counter wieder von vorne an zu zählen. Wie kann ich den hochsetzen?
script sieht aus wie folgt:
________________________________________________________________
#!/usr/bin/perl
####################################
# Setup begin
$counterfile = "../counter/counter.txt"; #Full file path of counter.txt
$imagefile{'0'}="../counter/0.gif"; #Full file path of 0.gif
$imagefile{'1'}="../counter/1.gif"; #Full file path of 1.gif
$imagefile{'2'}="../counter/2.gif"; #Full file path of 2.gif
$imagefile{'3'}="../counter/3.gif"; #Full file path of 3.gif
$imagefile{'4'}="../counter/4.gif"; #Full file path of 4.gif
$imagefile{'5'}="../counter/5.gif"; #Full file path of 5.gif
$imagefile{'6'}="../counter/6.gif"; #Full file path of 6.gif
$imagefile{'7'}="../counter/7.gif"; #Full file path of 7.gif
$imagefile{'8'}="../counter/8.gif"; #Full file path of 8.gif
$imagefile{'9'}="../counter/9.gif"; #Full file path of 9.gif
#Setup end
############################
$|=1;
@querys = split(/&/, $ENV{'QUERY_STRING'});
foreach $query (@querys) {
($name, $value) = split(/=/, $query);
$FORM{$name} = $value;
}
$position="$FORM{'position'}";
open(NUMBER,"$counterfile");
$number=<NUMBER>;
close(NUMBER);
$number++;
if ($position==1) {
open(NUMBER,">$counterfile");
print NUMBER "$number";
close(NUMBER);
}
if (($position>0) && ($position<=length($number))) {
$positionnumber=substr($number,(length($number)-$position),1);
}
else {
$positionnumber="0";
}
if ($imagefile{$positionnumber}) {
$imagereturn=$imagefile{$positionnumber};
}
else {
$imagereturn=$imagefile{'0'};
}
print "Content-type: image/gif\n\n";
open(IMAGE,"<$imagereturn");
print <IMAGE>;
close(IMAGE);
exit 0;
________________________________________________________________
Im Voraus vielen Dank für Eure Hilfe.
