Gossamer Forum
Home : Products : Links 2.0 : Customization :

Re: visitors online = ?

Quote Reply
Re: visitors online = ? In reply to
Ok.....
I use this command in .shtml file because my server accept:

Nothing happens! the page is blank, look:
http://www.lokirj.com.br/powerbusca/teste.shtml

my "log.db" is create into cgi-bin and chmod 666


My uonline.cgi

#!/usr/bin/perl

use strict;
my $log = '/home/lokirj/www/powerbusca/cgi-bin';
my $ip = $ENV{REMOTE_ADDR};
my $now = time();
my %ip;
my $count = 1;
open (LOG, "$log/log.db") or die("Could not open log file for reading: $!");
open (TEMP, ">$log/temp.db") or die("Couldn't create temp log file: $!");
flock (TEMP, 2);
while (<LOG>) {
chomp;
my @data = split /\|/, $_;
(($now - $data[1] > 600) or ($ip eq $data[0]) or (exists $ip{$data[0]})) and next;
$ip{$data[0]} = 1;
$count++;
print TEMP join("|", @data), "\n";
}
print TEMP join("|", ($ip, $now)), "\n";
close (TEMP);
close (LOG);
rename ("$log/temp.db", "$log/log.db");
print "Content-type: text/html\n\n";
print $count;

Thanks for help!
Giovanni


Subject Author Views Date
Thread visitors online = ? Abid 9761 Jul 15, 2001, 9:37 PM
Thread Re: visitors online = ?
sponge 9343 Jul 15, 2001, 10:23 PM
Thread Re: visitors online = ? under win32
DenisSlinkin 8994 Jul 25, 2001, 3:23 AM
Thread Re: visitors online = ? under win32
sponge 8974 Jul 25, 2001, 9:01 AM
Thread Re: visitors online = ? under win32 flock error
DenisSlinkin 8946 Jul 26, 2001, 1:24 AM
Post Re: visitors online = ? under win32 flock error
Stealth 8924 Jul 26, 2001, 7:47 AM
Thread Re: visitors online = ? under win32 flock error
sponge 8888 Jul 26, 2001, 8:39 AM
Post Re: visitors online = ? under win32 flock error
DenisSlinkin 8920 Jul 26, 2001, 9:14 AM
Thread Re: visitors online = ?
sponge 9331 Jul 15, 2001, 11:34 PM
Thread Re: visitors online = ?
Abid 9378 Jul 16, 2001, 12:31 AM
Thread Re: visitors online = ?
Abid 9347 Jul 16, 2001, 1:16 AM
Thread Re: visitors online = ?
sponge 9502 Jul 16, 2001, 8:35 AM
Thread Re: visitors online = ?
Abid 9253 Jul 16, 2001, 4:49 PM
Post Re: visitors online = ?
Stealth 9252 Jul 16, 2001, 5:19 PM
Thread Re: visitors online = ?
sponge 9281 Jul 16, 2001, 7:32 PM
Post Re: visitors online = ?
Abid 9206 Jul 17, 2001, 6:37 AM
Post Re: visitors online = ?
blacknight 9053 Jul 21, 2001, 9:59 AM
Thread Re: visitors online = ?
stilton 9230 Jul 18, 2001, 5:43 AM
Thread Re: visitors online = ?
lokirj 9192 Jul 19, 2001, 1:49 PM
Thread Re: visitors online = ?
sponge 9196 Jul 19, 2001, 2:20 PM
Thread Re: visitors online = ?
Paul 4898 Jul 26, 2001, 9:19 AM
Thread Continue of topic visitors online.
DenisSlinkin 4642 Aug 12, 2001, 9:27 PM
Thread Re: [DenisSlinkin] Continue of topic visitors online.
hacker 4466 Sep 30, 2001, 4:15 PM
Thread Is this the problem
hacker 4562 Sep 30, 2001, 4:23 PM
Thread Re: [hacker] Is this the problem
sponge 4470 Sep 30, 2001, 7:59 PM
Thread Re: [PerlFreak] Is this the problem
hacker 4484 Oct 1, 2001, 6:13 AM
Thread Re: [hacker] Is this the problem
hacker 4469 Oct 1, 2001, 6:19 AM
Thread Re: [hacker] Is this the problem
hacker 4697 Oct 1, 2001, 2:06 PM
Thread Re: [hacker] Is this the problem
sponge 4504 Oct 1, 2001, 7:38 PM
Thread Re: [PerlFreak] Is this the problem
hacker 4449 Oct 2, 2001, 3:53 PM
Post Re: [hacker] Is this the problem
roman365 4447 Oct 15, 2001, 8:06 AM
Thread Re: visitors online = ?
Abid 9196 Jul 19, 2001, 7:26 PM
Thread Re: visitors online = ?
lokirj 9109 Jul 19, 2001, 8:41 PM
Thread Re: visitors online = ?
hacker 9141 Jul 20, 2001, 6:27 AM
Thread Re: visitors online = ?
lokirj 9066 Jul 20, 2001, 8:06 AM
Post Re: visitors online = ?
lokirj 9041 Jul 20, 2001, 1:23 PM