-
Notifications
You must be signed in to change notification settings - Fork 34
functions_modules_geoip
Modul to localize ip-adresses. Uses the free version of GeoIP from maxmind. In the majority of cases maxmind publishes updates for the GeoLiteCity.dat on the first day each month.
Definition: public function geoip_init()
Returns: void
Resolves an IP address to a location.
Definition: public function get_geo_location_by_ip($ip_address=null)
Returns: stdClass Object containing location information
Parameters:
-
string $ip_address
IP address to check (defaults to get_ip_address)
Returns the region name for the current IP address See get_ip_address
Definition: public function get_geo_region()
Returns: string
Location name or empty string if unknown
Resolves an IP address to geo coordinates.
Definition: public function get_coordinates_by_ip($ip=false)
Returns: array
Associative array with keys 'latitude' and 'longitude'
Parameters:
-
string $ip
IP address to resolve (defaults to get_ip_address)
Resolves an IP address to a country code
Definition: public function get_countrycode_by_ip($ipaddr=false)
Returns: array
Country code or empty string if not found
Parameters:
-
string $ipaddr
IP address to resolve (defaults to get_ip_address)
Returns the country name from the current IP See get_ip_address
Definition: public function get_countryname_by_ip()
Returns: string
Country name or empty string if unknown
Returns the timezone for an IP address.
Definition: public function get_timezone_by_ip($ip=false)
Returns: string
Timezone identifier or false on error
Parameters:
-
string $ip
IP address to check (defaults to get_ip_address)