Converts IP Addresses to Geo Addresses

Some functions require a licensed version of the MaxMind GeoIP database. If you need to use
these functions, please purchase the database and then call setGeoIPDB

Class Methods

The following methods can be invoked on instances of this class.

init()

Includes the Geo IP libraries

getLocation(mixed strIp)

Returns an instance of a PEAR::Net_GeoIP database

getCountryName(string strIP)

Returns a country name for an ip address

getCountryCode(string strIP)

Returns a country code for an ip address (3 chars)

getCountryCode2Char(string strIP)

Returns a country code for an ip address (2 chars)

getCity(string strIP)

Returns a city for an ip address
Requires licensed version of GeoIP database

getRegion(string strIP)

Returns the region for an ip address
Requires licensed version of GeoIP database

__call(mixed strName, array arrArguments)

Magic function to trap calls to undefined functions and throw an exception rather than
a fatal error.

__callStatic(mixed strName, array arrArguments)

Magic function to trap static calls to undefined functions and throw an exception rather
than a fatal error.

classGetFolder()

Returns the folder where the class exists

__set_state(mixed arrValues)

classGetFolderResources()

Returns the folder where the class's resources exist

classGetSrcFile()

Returns the folder where the class exists

classGetSrcHash()

Returns the folder where the class exists

classGetReflection()

Returns the reflection data for the current class

classGetReflectionAnnotation(string strField)

Returns a specific class annotation for the current class