|
dolibarr
13.0.2
|
Classe to manage GeoIP Usage: $geoip=new GeoIP('country',$datfile); $geoip->getCountryCodeFromIP($ip); $geoip->close();. More...
Public Member Functions | |
| __construct ($type, $datfile) | |
| Constructor. More... | |
| getCountryCodeFromIP ($ip) | |
| Return in lower case the country code from an ip. More... | |
| getCountryCodeFromName ($name) | |
| Return in lower case the country code from a host name. More... | |
| getVersion () | |
| Return verion of data file. More... | |
| close () | |
| Close geoip object. More... | |
Classe to manage GeoIP Usage: $geoip=new GeoIP('country',$datfile); $geoip->getCountryCodeFromIP($ip); $geoip->close();.
Definition at line 34 of file dolgeoip.class.php.
| DolGeoIP::__construct | ( | $type, | |
| $datfile | |||
| ) |
Constructor.
| string | $type | 'country' or 'city' |
| string | $datfile | Data file |
Definition at line 44 of file dolgeoip.class.php.
References dol_syslog(), and print.
| DolGeoIP::close | ( | ) |
| DolGeoIP::getCountryCodeFromIP | ( | $ip | ) |
Return in lower case the country code from an ip.
| string | $ip | IP to scan |
Definition at line 111 of file dolgeoip.class.php.
| DolGeoIP::getCountryCodeFromName | ( | $name | ) |
Return in lower case the country code from a host name.
| string | $name | FQN of host (example: myserver.xyz.com) |
Definition at line 166 of file dolgeoip.class.php.
| DolGeoIP::getVersion | ( | ) |
Return verion of data file.
Definition at line 197 of file dolgeoip.class.php.