devtoolboxuk / ip-address
IP Address Library
1.0.1
2019-05-25 20:08 UTC
Requires (Dev)
This package is auto-updated.
Last update: 2024-10-26 08:14:15 UTC
README
Table of Contents
Background
Used to convert an IP address to an Integer, or for a IPv6 IP address, a long it will also convery an IP range into an array of integers representing the IP address.
Initially created so that I could store IP addresses in a database and do a look up against it.
Usage
$ composer require devtoolboxuk/ip-address
Then include Composer's generated vendor/autoload.php to enable autoloading:
require 'vendor/autoload.php';
use devtoolboxuk/ip-address; IP::parse($ipAddress)->long IP::parse($ipAddress)->toLong()
Maintainers
License
MIT © DevToolboxUK