_common_get_org

The Google Font Fix common get org function.

Description

_common_get_org( $gi, $seek_org ); 

Parameters (2)

0. $gi
The gi.
1. $seek_org
The seek org.

Usage

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

Defined (1)

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

/geo/geoip.inc.php  
  1. function _common_get_org($gi, $seek_org) 
  2. $record_pointer = $seek_org + (2 * $gi->record_length - 1) * $gi->databaseSegments; 
  3. if ($gi->flags & GEOIP_SHARED_MEMORY) { 
  4. $org_buf = _sharedMemRead($gi, $record_pointer, MAX_ORG_RECORD_LENGTH); 
  5. } else { 
  6. fseek($gi->filehandle, $record_pointer, SEEK_SET); 
  7. $org_buf = fread($gi->filehandle, MAX_ORG_RECORD_LENGTH); 
  8. $org_buf = _safe_substr($org_buf, 0, strpos($org_buf, "\0")); 
  9. return $org_buf;