Download the PHP package s1lentium/iptools without Composer
On this page you can find all versions of the php package s1lentium/iptools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package iptools
IPTools
PHP Library for manipulating network addresses (IPv4 and IPv6).
Installation
Composer: Run in command line:
or put in composer.json:
Usage
IP Operations
Parsing IP from integer, binary and hex:
or:
Converting IP to other formats:
Other public properties:
maxPrefixLength
The max number of bits in the address representation: 32 for IPv4, 128 for IPv6.
octetsCount
The count of octets in IP address: 4 for IPv4, 16 for IPv6
reversePointer
The name of the reverse DNS PTR for the address:
Network Operations
Exclude IP from Network:
192.0.0.0/9
192.128.0.0/11
192.160.0.0/13
192.168.0.0/24
192.168.1.0/32
192.168.1.2/31
...
192.192.0.0/10
Exclude Subnet from Network:
192.0.0.0/9
192.128.0.0/11
192.160.0.0/13
192.168.0.0/24
192.168.2.0/23
...
192.192.0.0/10
Split network into equal subnets
192.168.0.0/24
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24
Iterate over Network IP adresses:
192.168.1.0
...
192.168.1.255
Get Network hosts adresses as Range:
192.168.1.1
...
192.168.1.254
Count Network IP adresses
Range Operations
Define the range in different formats:
Check if IP is within Range:
Iterate over Range IP adresses:
192.168.1.1
...
192.168.1.254
Get Networks that fit into a specified range of IP Adresses:
192.168.1.1/32
192.168.1.2/31
192.168.1.4/30
192.168.1.8/29
192.168.1.16/28
192.168.1.32/27
192.168.1.64/26
192.168.1.128/26
192.168.1.192/27
192.168.1.224/28
192.168.1.240/29
192.168.1.248/30
192.168.1.252/31
192.168.1.254/32
Count IP adresses in Range
License
The library is released under the MIT.
All versions of iptools with dependencies
ext-bcmath Version *