Skip to content
/ php-ip Public
forked from rlanvin/php-ip

IPv4/IPv6 manipulation library for PHP

License

Notifications You must be signed in to change notification settings

macmon/php-ip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP IP Library

IPv4/IPv6 manipulation library for PHP inspired by Python ipaddress.

Build Status

Requirements

Installation

Option 1 (PHP <= 5.2)

Option 2 (PHP >= 5.3)

The recommended way is to install the lib through Composer.

Just add this to your composer.json file:

{
    "require": {
        "rlanvin/php-ip": "dev-master"
    }
}

Then run composer install or composer update.

Now you can use the autoloader, and you will have access to the library:

<?php
require 'vendor/autoload.php';

Caution: This library is compatible with PHP 5.2, therefore it is not namespaced.

Documentation

Complete doc is available in the wiki.

Disclaimer

I built this library for a project running PHP 5.2 (yep that's old). PHP 5.2 doesn't support late static binding, traits, namespaces and the like. So that explains some of the quirks of the design.

License

This library is released under the MIT License.

About

IPv4/IPv6 manipulation library for PHP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 99.6%
  • Shell 0.4%