Just generate a redirection header, as documented in
the CGI Manpage.
#!/usr/bin/perl -w
use strict;
use CGI;
my $query = new CGI;
my $url = $query->param("whatever");
### log the url to a file, database or whatever
### redirect user
print $query->redirect(-uri=>$url,
-nph=>1);
hope to help
update: oops, forgot to use CGI :)
snowcrash ////// | [reply] [d/l] |
Well, you are on the right track in that you think
displaying the page with no content is kind of redundunt.
First read the documentation for CGI.pm ( you *are* using CGI.pm,
aren't you? ), and check out redirect()
And if you want to know how that works, here's an
explanation about the
Location HTTP header
| [reply] |
unfortunately if you have plain offsite links, the browser
doesn't have to come back to your site at all to follow the
link, so unless you redirect them to an onsite page first
(which you can clearly track) you're theoretically out of
luck.
Except that you could make the link not really a link, but
a javascript button that would simultaneously load some
onsite cgi with a tracking parameter in one frame, say,
while loading the intended target page in the other.
That's where it stops being a perl question though, and I'm
not sure that kind of practice would be looked upon as
entirely ethical, so... YMMV.
All the best,
Grem
mail q.gremio..q.@..q.speakeasy..q@.@.q.org.; | [reply] |
Some ideas you can use may be found at merlyn's web techniques articles, especially numbers 25 and 58.
| [reply] |