Nothing special to the way these sites work. You can check out
http://www.rileyjames.com and http://www.ryanparr.com (the programming on
the latter will leave you in awe :) I want to host my sites and have a
decent usage statistics location, but I just can't seem to get the logging
part down. I've got a long road ahead of me :)

For instance, the code below logs the following on entrance to
rileyjames.com (setup as PerlFixupHandler):
www.rileyjames.com      /       Wed Feb 13 16:17:15 2002
www.rileyjames.com      /index.html     Wed Feb 13 16:17:15 2002
www.rileyjames.com      /topnavigation.htm      Wed Feb 13 16:17:15 2002
www.rileyjames.com      /white.htm      Wed Feb 13 16:17:15 2002
www.rileyjames.com      /green.htm      Wed Feb 13 16:17:15 2002
www.rileyjames.com      /index1.htm     Wed Feb 13 16:17:15 2002
www.rileyjames.com      /topnav.css     Wed Feb 13 16:17:15 2002
www.rileyjames.com      /graphics/redarrow.gif  Wed Feb 13 16:17:15 2002
www.rileyjames.com      /border.css     Wed Feb 13 16:17:15 2002
www.rileyjames.com      /text.css       Wed Feb 13 16:17:15 2002
www.rileyjames.com      /graphics/frontpaglogo.gif      Wed Feb 13 16:17:15
2002

The code follows:
sub handler {
        my $r = shift;
        return DECLINED unless($r->is_main());
        # Same behavior when:
        # return DECLINED unless($r->is_initial_req());

        open TRACK, ">>/usr/local/www/usertracker.txt" or die "Couldn't open
log: $!";
        print TRACK
join("\t",($r->hostname,$r->uri,scalar(localtime))),"\n";
        close TRACK;
        return DECLINED;
}

-- Ryan

----- Original Message -----
From: "Ask Bjoern Hansen" <[EMAIL PROTECTED]>
To: "Ryan Parr" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, February 13, 2002 2:34 PM
Subject: Re: Custom Logging and User Tracking


> On Wed, 13 Feb 2002, Ryan Parr wrote:
>
> > Unfortunately we do have areas on the site where a link would point
directly
> > to a graphic file, which I'd like to log. Otherwise that would work
quite
> > well.
> >
> > I had always thought that these extra requests would be subrequests. If
not,
> > though, what would be the definition of a sub-request?
>
> A subrequest is when during processing of the original request make
> a new internal request.
>
> What you are looking for might be the Referer header; but without
> knowing more exactly how your site works and what URLs you use, it's
> hard to tell.
>
>
>  - ask
>
> --
> ask bjoern hansen, http://ask.netcetera.dk/         !try; do();
> more than a billion impressions per week, http://valueclick.com
>

Reply via email to