2017 © Pedro Peláez
 

library ip-matcher

Small class for checking ip addresses

image

atk14/ip-matcher

Small class for checking ip addresses

  • Friday, October 7, 2016
  • by michal.vojan
  • Repository
  • 2 Watchers
  • 0 Stars
  • 178 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 2 % Grown

The README.md

IpMatcher

Small class for comparing IP addresses. One address can be compared with a single IP address or array of IPs or subnets. Works with both IPv4 and IPv6 formats., (*1)

Basic usage

Compare two IPs, (*2)

IP::Match("127.0.0.1", "127.0.0.1");

Check an IP belongs to a 127.0.0.1-127.0.0.255 subnet, (*3)

IP::Match("127.0.0.1", "127.0.0.1/24");

Check an IP matches at least one of addresses/subnets specified in an array, (*4)

IP::Match("127.0.0.1", array("127.0.0.2", "127.0.0.1/24"));

Installation

Just use the Composer:, (*5)

$ cd path/to/your/atk14/project/
$ composer require atk14/ip-matcher

The Versions

07/10 2016

dev-master

9999999-dev https://github.com/atk14/IpMatcher

Small class for checking ip addresses

  Sources   Download

MIT

The Requires

  • php >=5.0.0

 

ip check mask compare subnet