use Socket;
$ipaddr = $ENV{'REMOTE_ADDR'};
;
if ($ipaddr[0] == '123.456.789.000')
{
print "Location: [yahoo.com\n\n";...]
}
else
{
print "Location: [google.com\n\n";...]
}
the problem is that, only the first two parts of the ip address are compared
user with IP 123.456.#*$!.xxx will direct to yahoo.
the last two "dot" parts(*.*.789.000) of the ip address weren't compared........
just wondering how to fix it if i just want the ip of 123.456.789.000 to visit a specific page?
thank you