Net_CheckIP2::is*()

Along with isValid()(), Net_CheckIP2 offers a couple methods to determine the IP's whereabouts. Currently implemented are methods to check if an IP is from a reserved IP space or the zeroconf pool.

isReserved()

Checks if the IP address is reserved (according to RFC1918).

isReserved()

<?php
require_once 'Net/CheckIP.php';
$ip '127.0.0.1';
var_dump(Net_CheckIP::isReserved($ip));
?>

isZeroconf()

Zeroconf - automatically created usable IPs without manual intervention or management/configuration servers. This includes IPs from 169.254.0.0 to 169.254.255.255. (RFC3330)

isZeroConf()

<?php
require_once 'Net/CheckIP.php';
$ip '127.0.0.1';
var_dump(Net_CheckIP::isZeroconf($ip));
?>
    Поддержать сайт на родительском проекте КГБ