DolGeoIP
class DolGeoIP (View source)
\class DolGeoIP \brief Class to manage GeoIP conversion Usage: $geoip=new GeoIP('country',$datfile); $geoip->getCountryCodeFromIP($ip); $geoip->close();
Properties
| Reader|GeoIP|string | $gi | ||
| string | $error | ||
| string | $errorlabel |
Methods
__construct("country"|"city" $type, string $datfile)
Constructor
string
getCountryCodeFromIP(string $ip)
Return in lower case the country code from an ip
string
getCountryCodeFromName(string $name)
Return in lower case the country code from a host name
string
getVersion()
Return version of data file
void
close()
Close geoip object
Details
__construct("country"|"city" $type, string $datfile)
Constructor
string
getCountryCodeFromIP(string $ip)
Return in lower case the country code from an ip
string
getCountryCodeFromName(string $name)
Return in lower case the country code from a host name
string
getVersion()
Return version of data file
void
close()
Close geoip object