IP tools in PHP
Install package by Composer:
composer require mileschou/ip
This a simple collection to store IP list and can find IP in list.
$collection = new V4();
$collection->addCidr('127.0.0.0/8');
$collection->has('127.0.0.1'); // true
$collection->has('192.168.0.1'); // false
The MIT License (MIT). Please see License File for more information.