Gossamer Forum
Home : Products : DBMan : Customization :

$ENV{'HTTP_REFERER'}

Quote Reply
$ENV{'HTTP_REFERER'}
Im using the $ENV{'HTTP_REFERER'} tag within my script and need to find the way to strip down the urls by using reg expressions.

I want to change:

"http://www.yahoo.com/asd/2332ee2/e2e2e2e/23e23e2/23e23e/23e23e23e/23e/23e//23e etc"

to simply

"www.yahoo.com"



Thanks!!
Quote Reply
Re: [eric74] $ENV{'HTTP_REFERER'} In reply to
$ENV{HTTP_REFERER} =~ m,^http://([^/]+),i and my $neat = $1;
Quote Reply
Re: [Paul] $ENV{'HTTP_REFERER'} In reply to
Thats the one! thanks