function geoip_region_name in GeoIP API 7.2
Same name and namespace in other branches
- 6 geoip.module \geoip_region_name()
- 7 geoip.module \geoip_region_name()
Returns the region name, given a country code and region code.
Parameters
string $ip: The ip to resolve, defaults to the current users ip.
Return value
string|FALSE The region name or FALSE on error.
Related topics
3 calls to geoip_region_name()
- geoip_admin_settings in ./
geoip.admin.inc - Menu callback and form builder for admin/settings/geoip.
- geoip_tokens in ./
geoip.tokens.inc - Implements hook_tokens().
- geoip_views_query_substitutions in ./
geoip.module - Implements hook_views_query_substitutions().
File
- ./
geoip.module, line 315 - API for using the MaxMind GeoLite Country database.
Code
function geoip_region_name($ip = NULL) {
$ip = $ip ? $ip : geoip_ip_address();
if ($gi = geoip_instance()) {
return $gi
->regionName($ip);
}
return FALSE;
}