in reply to Site Statistics using $ENV{'HTTP_REFERER'}

That information isn't saved by the HTTP protocol... You can however try sending a hidden field containing a javascript call to document.history. Since I'm no JS guru, I'll leave it at that.

Greetz
Beatnik
... Quidquid perl dictum sit, altum viditur.
  • Comment on Re: Site Statistics using $ENV{'HTTP_REFERER'}

Replies are listed 'Best First'.
Re: Re: Site Statistics using $ENV{'HTTP_REFERER'}
by ghost (Beadle) on Sep 21, 2001 at 06:25 UTC
    Here's how I do it:

    This JavaScript is written to the page:
    <script type="text/javascript" language="JavaScript"> <!-- document.write("<img src=\"ref.cgi?refer="); document.write(escape(document.referrer)); document.write("\" width=1 height=1>"); // --> </script>
    This CGI runs on the server (Pip.png is a 1 pixel graphic):
    #!/usr/bin/perl use CGI qw(:standard); my $pip = '/path/to/pip.png'; my $logf = '/path/to/referrer.log'; my $ref = param("refer"); open(LOG, ">>$logf"); print LOG $ref; close(LOG); open(PIP, "<$pip"); undef $/; my $pixel = <PIP>; close(PIP); $/ = "\n"; print header( -type=>'image/png' ); binmode(STDOUT); print STDOUT $pixel; exit;