dolibarr 19.0.3
|
Class to manage GeoIP conversion Usage: $geoip=new GeoIP('country',$datfile); $geoip->getCountryCodeFromIP($ip); $geoip->close();. More...
Public Member Functions | |
__construct ($type, $datfile) | |
Constructor. | |
getCountryCodeFromIP ($ip) | |
Return in lower case the country code from an ip. | |
getCountryCodeFromName ($name) | |
Return in lower case the country code from a host name. | |
getVersion () | |
Return verion of data file. | |
close () | |
Close geoip object. | |
Class to manage GeoIP conversion 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 50 of file dolgeoip.class.php.
References dol_syslog(), and getDolGlobalString().
DolGeoIP::close | ( | ) |
DolGeoIP::getCountryCodeFromIP | ( | $ip | ) |
Return in lower case the country code from an ip.
string | $ip | IP to scan |
Definition at line 119 of file dolgeoip.class.php.
References getDolGlobalString().
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 177 of file dolgeoip.class.php.
References getDolGlobalString().
DolGeoIP::getVersion | ( | ) |
Return verion of data file.
Definition at line 208 of file dolgeoip.class.php.
References getDolGlobalString().