Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Okay. Problem solved.

by providencia (Pilgrim)
on Apr 12, 2000 at 06:40 UTC ( #7362=note: print w/replies, xml ) Need Help??

in reply to Poor Man's Web Logger

After talking to someone else I found out that our(I work for a *non-profit ISP)system isn't normal. It was intentionally setup this way so users wouldn't crowd our lowly disk space with logs. It also keeps people from wanting to run Mom and Pop webstores. It took some tweaking but it works now. The data is also formatted to look like an apache logfile. That way it is much easier to parse the logfile. I'm very appreciative of the program. Notice that it plays nice for Daylight Savings Time (I'm in the central time zone).

I didn't personally make the changes. A friend did. At the time it was quicker for him to make the changes and for me to figure it out later than for me to break his train of thought as he taught me. :) * Not a non-profit "like" ISP. But a real Free-Net.

Changes were made here: my %entries = ('home' => '/index.html$|/$');

And here:

my $zulu_offset = $isdst ? "-0500" : "-0600"; my $date = "[$mday/$month/$year:$hour:$min:$sec $zulu_offset]"; unless ($ENV{REMOTE_ADDR} =~ /^$ips/) { my $hostname; $hostname = gethostbyaddr(inet_aton($ENV{REMOTE_ADDR}), AF_INE +T) or $hostname = $ENV{REMOTE_ADDR}; my $data = "$hostname - - $date"; open LOG, ">>$logfile" or last; flock LOG, 2; foreach (keys %entries) { print LOG "$data $_\n" if ($ENV{HTTP_REFERER} =~ /$entries{$ +_}/); } close LOG; }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://7362]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2016-10-25 23:31 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (330 votes). Check out past polls.