function geoip_region_name in GeoIP API 6
Same name and namespace in other branches
- 7.2 geoip.module \geoip_region_name()
- 7 geoip.module \geoip_region_name()
API function to retrieve the region name, given a country code and region code.
This function relies on the geoipregionvars.php file, which is just a huge array.
Related topics
File
- ./
geoip.module, line 254 - API for using the MaxMind GeoLite Country database.
Code
function geoip_region_name($country_code, $region_code) {
static $GEOIP_REGION_NAME;
if (!isset($GEOIP_REGION_NAME)) {
include drupal_get_path('module', 'geoip') . '/lib/geoipregionvars.php';
}
return $GEOIP_REGION_NAME[$country_code][$region_code];
}