in reply to Calling a script onto an HTML doc.
with ssi from an shtml file:
<!--#include virtual="/cgi-bin/sinister_tracking_script.pl"-->
and in sinister_tracking_script.pl:
my $page = $ENV{HTTP_REFERER}; # iirc
or more simply (unless you want to take the opportunity to generate the html for some of the page) and without requiring SSI:
<img src="/cgi-bin/creepy_bug.pl">
and from creepy_bug.pl you can retrieve the page address in the same way, log it and then either return a standard image file, print a counter for old times sake, or just not bother. Note that this method is vulnerable to browser caches and proxies and so on: best to add a unique identifier to the image address each time, so that the browser definitely asks for it. and yes, you can set a cookie while returning an image file, which you can't with ssi-included html.
Don't use this technique on remote pages, btw, especially not with very small images. People will make wild accusations.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Calling a script onto an HTML doc.
by FireBird34 (Pilgrim) on Oct 24, 2002 at 01:45 UTC |