SPUG: better way?
Sean Ruddy
sean at DigiDot.com
Mon Aug 9 22:21:46 CDT 1999
Better way to get just the domain from referer?
I think this code will show my newbieness (but it works...)
<HACK>
my $re = referer();
my $doubleslash = rindex($re,'//');
my $headslash = substr($re,$doubleslash+2);
my $domslash = index($headslash,'/');
print substr($headslash,0,$domslash);
</HACK>
Thanks,
Sean
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
Email to majordomo at pm.org: ACTION spug-list your_address
More information about the spug-list
mailing list