You are here

function smart_ip_get_region_static in Smart IP 6

Same name and namespace in other branches
  1. 8.4 smart_ip.module \smart_ip_get_region_static()
  2. 8.2 smart_ip.module \smart_ip_get_region_static()
  3. 8.3 smart_ip.module \smart_ip_get_region_static()
  4. 6.2 smart_ip.module \smart_ip_get_region_static()
  5. 7.2 smart_ip.module \smart_ip_get_region_static()
  6. 7 smart_ip.module \smart_ip_get_region_static()

Helper function for grabbing region name (FIPS).

1 call to smart_ip_get_region_static()
smart_ip_get_location in ./smart_ip.module
Get the geo location from the IP address

File

./smart_ip.module, line 698
Determines country, geo location (longitude/latitude), region, city and postal code of the user, based on IP address

Code

function smart_ip_get_region_static($country_code, $region_code) {
  static $region;
  if (!isset($region[$country_code][$region_code])) {
    module_load_include('inc', 'smart_ip', 'includes/smart_ip.region_lookup');
    $region[$country_code][$region_code] = smart_ip_get_region($country_code, $region_code);
  }
  return $region;
}