Apache-DBILogger
view release on metacpan or search on metacpan
bin/webstat_mail.pl view on Meta::CPAN
# count(server) as c from requests where server="www.monsted.com" and timeserved
# >= "1998-06-20" group by usertrack,remoteip order by remoteip;
$sth = DoSql(qq[select count(server),remoteip from $table where $serverquery
and $timequery
group by usertrack]);
$stat{usercount} = 0;
my %visitors = ();
while (my ($counts, $remoteip) = $sth->fetchrow) {
# only count those who've looked at more than one page
# (throw away spiders (and other who doesn't support cookies))
if ($counts > 1) {
# count it, he support cookies
$stat{usercount}++;
} else {
# remember the looser by hand
$visitors{$remoteip}++;
}
}
# add the noncookies if they hit more than one page (maybe we just should add them?)
for my $count (values %visitors) {
( run in 0.241 second using v1.01-cache-2.11-cpan-496ff517765 )