roypeng / china-ip-helper
There is no license information available for the latest version (v0.1.0) of this package.
A PHP China ip helper, it can distinguish china ips from ips
v0.1.0
2023-01-07 06:10 UTC
Requires
- php: >=7.4
Requires (Dev)
- phpunit/php-code-coverage: ^10.0
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2026-03-07 17:26:51 UTC
README
using china ip helper to help you check ip, it give you 2 results: "cn" or "other" that's all, having fun.
$ip = "8.8.8.8"; // google ip
$ipHelper = new ChinaIpHelper/IpHelper();
$ipHelper->checkIpCountry($ip); // other
$chinaIp = "1.0.1.0"; // example china ip
$ipHelper->checkIpCountry($ip); // cn