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));
?>
Class networks (Previous) Net_DNS (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.