geoip_country_id_by_name

The Google Font Fix geoip country id by name function.

Description

geoip_country_id_by_name( $gi, (string) $name ); 

Parameters (2)

0. $gi
The gi.
1. $name (string)
The name.

Usage

  1. if ( !function_exists( 'geoip_country_id_by_name' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-font-fix/geo/geoip.inc.php'; 
  3.  
  4. // The gi. 
  5. $gi = null; 
  6.  
  7. // The name. 
  8. $name = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = geoip_country_id_by_name($gi, $name); 
  12.  

Defined (1)

The function is defined in the following location(s).

/geo/geoip.inc.php  
  1. function geoip_country_id_by_name($gi, $name) 
  2. $addr = gethostbyname($name); 
  3. if (!$addr || $addr == $name) { 
  4. return false; 
  5. return geoip_country_id_by_addr($gi, $addr);