Re: Geting the Host from URL in cgi script
- From: noreply@xxxxxxxxx (Gunnar Hjalmarsson)
- Date: Fri, 28 Mar 2008 10:59:04 +0100
sivasakthi wrote:
I have passed the one URL to cgi script , and i have retrieve the values
by using the param method..
the example url is following ,
http://172.16.2.30:2004/block/blocked.cgi?url=google.com&target=gambling
now i wanted to retrieve the host of
http://172.16.2.30:2004/block/blocked.cgi .. how i can able to get that?
my $hostname =
( gethostbyaddr pack('W4', split /\./, '172.16.2.30'), 2 )[0];
Or maybe you are simply looking for the CGI variable $ENV{HTTP_HOST} ...
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
.
- Follow-Ups:
- Re: Geting the Host from URL in cgi script
- From: Gunnar Hjalmarsson
- Re: Geting the Host from URL in cgi script
- References:
- Geting the Host from URL in cgi script
- From: Sivasakthi
- Geting the Host from URL in cgi script
- Prev by Date: Geting the Host from URL in cgi script
- Next by Date: Re: Handling OLD files
- Previous by thread: Geting the Host from URL in cgi script
- Next by thread: Re: Geting the Host from URL in cgi script
- Index(es):
Relevant Pages
|