roypeng / china-ip-helper
A PHP China ip helper, it can distinguish china ips from ips
Installs: 229
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/roypeng/china-ip-helper
Requires
- php: >=7.4
Requires (Dev)
- phpunit/php-code-coverage: ^10.0
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2025-12-07 17:01:26 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