-
Notifications
You must be signed in to change notification settings - Fork 34
functions_modules_ip2location
Module to localize ip-addresses. Uses IP2Location Needs 'composer require ip2location/ip2location-php'
Definition: public function ip2location_init()
Returns: void
Resolves an IP address to a location.
Definition: public function get_geo_location_by_ip($ip=false)
Returns: stdClass|false
Object containing location information
Parameters:
-
string $ip
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($ip=false)
Returns: string|false
Location name or empty string if unknown
Parameters:
-
string $ip
IP address to resolve (defaults to get_ip_address)
Resolves an IP address to geo coordinates.
Definition: public function get_coordinates_by_ip($ip=false)
Returns: array|false
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($ip=false)
Returns: array|false
Country code or empty string if not found
Parameters:
-
string $ip
IP address to resolve (defaults to get_ip_address)
Returns the country name from the current IP
Definition: public function get_countryname_by_ip($ip=false)
Returns: string|false
Country name or empty string if unknown
Parameters:
-
string $ip
IP address to resolve (defaults to get_ip_address)
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)