Gossamer Forum
Home : General : Perl Programming :

Remote host

Quote Reply
Remote host
Hi;
How do i work this script with alex geeting;
Can't get the script work always get a 500 err.
($part1,$part2,$part3,$part4)=split(/\./,$ENV{REMOTE_ADDR});
$IP_adr=pack("C4",$part1,$part2,$part3,$part4);
($host_name)=(gethostbyaddr("$IP_adr", 2));


Wong
Quote Reply
Re: Remote host In reply to
Try changing $ENV{REMOTE_ADDR} to $ENV{'REMOTE_ADDR'} (note the single quotes).

I hope this helps.