p-12s / get-country-code-by-ip
The package will help you find the country code by ip-address
1.0.2
2019-11-17 21:34 UTC
Requires
- php: >=5.4
This package is auto-updated.
Last update: 2024-09-18 08:23:15 UTC
README
Will help you find the country code by ip-address
I took the code from the repository https://github.com/dostelon/TabGeo
and remade a little for myself.
Thanks to the author @dostelon
Using:
// require_once('vendor/p-12s/get-country-code-by-ip/src/CountryCodeFinder.php');
$finder = new CountryCodeFinder\CountryCodeFinder();
echo $finder->getCode('178.200.170.41'); // DE
echo $finder->getCode('176.31.69.179'); // BE