Details
Mesour IP addresses
-
Author
-
IP address normalizer and validator. For IPv4 and IPv6.
Install
Usage
Usage: Mesour\IpAddresses\IpAddressValidator
Assert::true(IpAddressValidator::isIpV6('2a00:5565:2222:800::200e'));
Assert::true(IpAddressValidator::isIpV4('127.0.0.1'));
Usage: Mesour\IpAddresses\IpAddressNormalizer
Normalize IPv6:
IpAddressNormalizer::normalizeIpV6('2001:db8:800::ff00:42:8329');
// result is: 2001:0db8:0800:0000:0000:ff00:0042:8329
Compress IPv6:
IpAddressNormalizer::compressIpV6('2001:0db8:0800:0000:0000:ff00:0042:8329');
// result is: 2001:db8:800::ff00:42:8329
Tests
-
Run tests: `bin/check-tests`
-
PHP Stan: `bin/check-stan`
-
Code style: `bin/check-cs`
|
Name: |
PHP IP Address Validation |
Base name: |
ip-addresses |
Description: |
Validate and normalize IPv4 and IPv6 addresses |
Version: |
- |
PHP version: |
5 |
License: |
Custom (specified in a license file) |
|
|
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.
|
Files |
|
File |
Role |
Description |
Mesour (1 directory) |