Class NLS_GeoIP

Description

Located in /NLS/NLS/GeoIP.php (line 126)


	
			
Variable Summary
 string $_datafile
 resource $_filehandle
Method Summary
 NLS_GeoIP NLS_GeoIP (string $datafile)
 integer countryCodeByAddr (string $addr)
 integer countryCodeByName (string $name)
 integer countryIdByAddr (string $addr)
 integer countryIdByName (string $name)
 mixed countryNameByAddr (string $addr)
 integer countryNameByName (string $name)
 mixed getCountryInfo (string $name)
 object NLS_GeoIP &singleton (string $datafile)
Variables
string $_datafile (line 133)

The location of the GeoIP database.

resource $_filehandle (line 140)

The open filehandle to the GeoIP database.

Methods
Constructor NLS_GeoIP (line 169)

Create a NLS_GeoIP instance (Constructor).

NLS_GeoIP NLS_GeoIP (string $datafile)
  • string $datafile: The location of the GeoIP database.
countryCodeByAddr (line 318)

Returns the country abbreviation (2-letter) for an IP Address.

  • return: The country abbreviation.
integer countryCodeByAddr (string $addr)
  • string $addr: The IP Address.
countryCodeByName (line 266)

Returns the country abbreviation (2-letter) for a hostname.

  • return: The country abbreviation.
integer countryCodeByName (string $name)
  • string $name: The hostname.
countryIdByAddr (line 302)

Returns the country ID for an IP Address.

  • return: The GeoIP country ID.
integer countryIdByAddr (string $addr)
  • string $addr: The IP Address.
countryIdByName (line 247)

Returns the country ID for a hostname.

  • return: The GeoIP country ID.
integer countryIdByName (string $name)
  • string $name: The hostname.
countryNameByAddr (line 336)

Returns the country name for an IP address.

  • return: The country name.
mixed countryNameByAddr (string $addr)
  • string $addr: The IP address.
countryNameByName (line 284)

Returns the country name for a hostname.

  • return: The country name.
integer countryNameByName (string $name)
  • string $name: The hostname.
getCountryInfo (line 223)

Returns the country ID and Name for a given hostname.

  • return: An array with 'code' as the country code and 'name' as the country name, or false if not found.
  • since: Horde 3.2
mixed getCountryInfo (string $name)
  • string $name: The hostname.
singleton (line 153)

Returns a reference to the global NLS_GeoIP object, only creating it if it doesn't already exist.

This method must be invoked as: $geoip = &GeoIP::singleton($datafile);

  • return: The NLS_GeoIP instance.
object NLS_GeoIP &singleton (string $datafile)
  • string $datafile: The location of the GeoIP database.

Documentation generated on Sun, 30 Jan 2011 05:17:50 +0000 by phpDocumentor 1.4.3