use CGI qw(param); require "config.txt"; $refresh="60"; $ip=$ENV{'REMOTE_ADDR'}; $time=time; open(FILE,$log); flock (FILE,3); @users=; close(FILE); foreach $lines (@users){ chop($lines); ($ips,$times,$locationold,$titles)=split('×',$lines); $timeoff=$time-$times; push @titlez,$titles if (!$exists{$titles}); push @locations,$locationold if (!$exists{$locationold}); $exists{$locationold}=1; $exists{$titles}=1; ${$locationold}{online}++; } $line="$ip×$time×$place×$title"; ${$location}{online}++; foreach $loc (@locations){ if(${$loc}{online} < "2") { ${$loc}{users} = "user"; } else { ${$loc}{users} = "users"; } } #### foreach $ttl (@titlez){ #chop($ttl); ($titlea)=split('þ',$ttl); push @titleb,$titlea if (!$exists{$titlea}); $exists{$titlea}=1; } foreach $loctitle (@titleb){ $online++; } #### if($online < "2") { $users = "user"; $userz = "User"; } else { $users = "users"; $userz = "Users"; } $nocache = "\n"; $nocache .= ""; print "Content-type: text/html\n\n"; open (FILE,"<$header"); while( $tmplh = ) { $tmplh =~ s/<>/$online/g; $tmplh =~ s/<>/$userz/g; $tmplh =~ s/<\/head>/$nocache/g; print $tmplh; } close(FILE); foreach my $loc (sort {${$b}{online} <=> ${$a}{online}} @locations) { if ($loc eq "" || $loc eq "Unknown" ) { $area = "Unknown"; } else { if ($loc =~ /http:/i && $loc ne "") { $area = "$loc<\!-- Titlez: @titlez -->"; } else { $area = "$loc"; } } open (FILE,"<$middle"); while( $tmplm = ) { $tmplm =~ s/<>/${$loc}{online}/g; $tmplm =~ s/<>/${$loc}{users}/g; $tmplm =~ s/<>/$area/g; print $tmplm; print "\n"; } close(FILE); } $showon = "$online $users"; # If you even dare try to edit ANYTHING between here... $cr = "Powered By UzerzOnlyne v$version\n"; # and here, that will make this script against the Copyright that was placed upon it. Don't even # try it. That is your only warning. $cr .= ""; open (FILE,"<$footer"); while( $tmplf = ) { $tmplf =~ s/<>/$showon/g; $tmplf =~ s/<\/body>/$cr/g; print $tmplf; } close(FILE);