devtoolboxuk/ip-address

IP Address Library

1.0.1 2019-05-25 20:08 UTC

This package is auto-updated.

Last update: 2024-10-26 08:14:15 UTC


README

Build Status Scrutinizer Code Quality Coveralls CodeCov

Latest Stable Version Total Downloads License

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

@DevToolboxUk.

License

MIT © DevToolboxUK