in reply to Getting the URL of a referer
There are many ways to do this (say, maybe that should be a slogan :-).
The best way, if you have the URI module installed, is this:
That will handle more obscure cases, such as "https://joe@www.yahoo.com:4040/fred?billy".use URI::URL; my $host = URI::URL->new($ENV{'HTTP_REFERER'})->host;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting the URL of a referer
by Coruscate (Sexton) on Dec 23, 2003 at 19:24 UTC | |
by ACJavascript (Acolyte) on Dec 24, 2003 at 15:43 UTC |