<?
function nats2ip($ip)
{
// Test for new version of IP (Hex)
if (strpos($ip, '0x') === 0)
{
$ip = hexdec($ip);
}
return long2ip($ip);
}
$ip = nats2ip(0xC0A8071B);
echo $ip;
?>
<?
function nats2ip($ip)
{
// Test for new version of IP (Hex)
if (strpos($ip, '0x') === 0)
{
$ip = hexdec($ip);
}
return long2ip($ip);
}
$ip = nats2ip(0xC0A8071B);
echo $ip;
?>
Comments