You are here

function geoip_country_id_by_name in GeoIP API 6

Same name and namespace in other branches
  1. 7 lib/geoip.inc \geoip_country_id_by_name()
2 calls to geoip_country_id_by_name()
geoip_country_code_by_name in lib/geoip.inc
geoip_country_name_by_name in lib/geoip.inc

File

lib/geoip.inc, line 362

Code

function geoip_country_id_by_name($gi, $name) {
  $addr = gethostbyname($name);
  if (!$addr || $addr == $name) {
    return false;
  }
  return geoip_country_id_by_addr($gi, $addr);
}