Create object.

$objGeo = new GeoApi(IP_ADDRESS,REQUEST_TYPE,LICENSE_KEY);

IP_ADDRESS = Pretty self explaintory really, IP address you wish to query.
LICENSE_KEY = The license key given by maxmind to use the maxmind web service.
REQUEST_TYPE = The type of request you would like to. To make it easy and make the code more readable, there are a few constants within the class.

Object Usage

$objGeo->execute(); // This is when the curl request to the web service is done.
$arResults = $objGeo->getRecordData(); // Fetches the entry record into an array.
// Or data could be fetched in a singlaur mode request the variable off the object. (Variable naming is below)
$countryCode = $objGeo->country_code;

Variable names

country_code – Two letter code for the country.
city – Name of the city
reigon – State or reigon.
latitude – Location’s latitude
longitude – Location’s longitude
post_code – Post code aka zip code
metro_code – I have no idea
isp – Name of the isp owning the IP
organization – Name of the organization owning the IP