[wplug] logging visitors
Mark Griskey
mark at linuxhardware.net
Mon Dec 31 10:51:26 EST 2007
All of what you need is in the HTTP Environment. Here is a list:
http://www.cgi101.com/class/ch3/text.html
In Perl, these are available as %ENV, so to get log the IP and user
agent, for example:
print FILE $ENV{'REMOTE_ADDR'} . " " . $ENV{'HTTP_USER_AGENT'}. "\n";
You probably could approximate the common log format and then run the
logs through any number of analytics programs (like webalizer).
Zach wrote:
> We are now allowed to run cgi-bin scripts from our web space so I was
> wondering if anyone has some code (preferably in Perl or C) which will
> log:
>
> where they came from (ip and hostmask if available)
> what time they accessed the page
> the referrer
> what OS they use
> what web browser they use
> how long they stayed
> what was the last page they viewed before leaving
>
> Thanks,
> Zach
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>
More information about the wplug
mailing list