Skip to content

CIDRmatch is a library to match an IP to an IP range in CIDR notation (IPv4 and IPv6).

License

Notifications You must be signed in to change notification settings

tholu/php-cidr-match

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

CIDR match

CIDRmatch is a library to match an IP to an IP range in CIDR notation (IPv4 and IPv6).

NOTE: Symfony2 already does everything this library here does with its IpUtils module. Unfortunately I discovered this only after I finished working on this library.

Usage

$cidrMatch = new CIDRmatch();
$cidrMatch->match($ip, $cidr);

Tests

./vendor/bin/phpunit tests/CIDRmatchTest

About

CIDRmatch is a library to match an IP to an IP range in CIDR notation (IPv4 and IPv6).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages