php-ip-tools
php-ip-tools copied to clipboard
Useful tools for IP manipulations
Seams that this library is missing function to validate given range, like: Ip::isValidRange()
**`$wildcard_dec = pow(2, (32 - $netmask)) - 1;`** Is 32 should be 128? And how large number calculate with '&' ? Thank you.
When passing an empty string as the IP like this: ```php $ip = ''; $is_remote = Ip::isRemote($ip); ``` it returns `true`, even thought the IP itself is invalid. This is...
add some code(32bit) like follow : public function network() { return long2ip(ip2long($this->address) & ip2long($this->netmask())); } public function broadcast() { return long2ip(ip2long($this->network()) | (~(ip2long($this->netmask())))); } public function inverse() { return long2ip(~(ip2long('255.255.255.255')...