php ^ 8.0phpunit/phpunit": ">=11.1"
Run this composer code
$ composer require sirmerdas/ip-helper
use Sirmerdas\IpHelper\IpTools;
include "vendor/autoload.php";
print_r(IpTools::getClientIpInfo()); // [[address] => ::1,[version] => 6]echo IpTools::getIpVersion("::1"); // 6var_dump(IpTools::verifyIpV4("::1")); // falsevar_dump(IpTools::verifyIpV6("::1")); // trueecho IpTools::fakeIpV4(); // 127.0.0.1echo IpTools::fakeIpV6(); // ::1- This package is This package is created and modified under the MIT License.