previousNet_Geo::Net_Geo() (Previous) (Next) Net_GeoIPnext

View this page in Last updated: Tue, 02 Jun 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Net_Geo::getRecord()

Net_Geo::getRecord() – get geographical information about IP

Synopsis

require_once('Net/Geo.php');

array getRecord() ( mixed $target )

Description

Get geographical information about a list of targets or a single target. Error messages or "OK" are written to element STATUS of the returned array.

Parameter

  • mixed $target - A single IP or an array of IPs.

Return value

array - Informative array about geographical location of target(s)

Throws

STATUS Error Codes
Error code Error message Reason Solution
string "OK" "No error occured." Target was resolved properly. NULL
const INPUT_ERROR "User input is unusable target " The target given cannot be used. Check target parameter: A string with a single domain or IP, or a one-dimensional array with domain or IP in every element
const NETGEO_HTTP_ERROR "Netgeo unreachable" A connection to the Netgeo service could not be established. Check http://netgeo.caida.org/perl/netgeo.cgi (the default server URL used). If the script moved, use the parameter $alternateServerUrl in Net_Geo().

Note

This function can not be called statically.

previousNet_Geo::Net_Geo() (Previous) (Next) Net_GeoIPnext

Download Documentation Last updated: Tue, 02 Jun 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.