geoip_country_name_by_addr

The Google Font Fix geoip country name by addr function.

Description

geoip_country_name_by_addr( $gi, $addr ); 

Parameters (2)

0. $gi
The gi.
1. $addr
The addr.

Usage

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

Defined (1)

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

/geo/geoip.inc.php  
  1. function geoip_country_name_by_addr($gi, $addr) 
  2. if ($gi->databaseType == GEOIP_CITY_EDITION_REV1) { 
  3. $record = GeoIP_record_by_addr($gi, $addr); 
  4. return $record->country_name; 
  5. } else { 
  6. $country_id = geoip_country_id_by_addr($gi, $addr); 
  7. if ($country_id !== false) { 
  8. return $gi->GEOIP_COUNTRY_NAMES[$country_id]; 
  9. return false;