InfoSniperGeolocationService
in package
implements
IIPGeoLocationService
IP Geolocation Service for InfoSniper.net
Table of Contents
Interfaces
- IIPGeoLocationService
- Interface for IP Geolocation Services
Constants
- ERROR_FETCHING_IP_INFO = "error_fetching_ip_info"
- ERROR_INVALID_API_KEY = "invalid_api_key"
- ERROR_PARSING_XML = "error_parsing_xml"
- ERROR_QUOTA_EXCEEDED = "quota_exceeded"
Properties
- $apiKey : mixed
Methods
- __construct() : mixed
- bulkGeocodeIPs() : null|array<string|int, mixed>
- Geocodes multiple IP Addresses
- fetchIpInfo() : SimpleXMLElement|null
- geocodeIP() : null|IPGeocoderData
- Geocodes an IP Address
- withApiKey() : InfoSniperGeolocationService
- Creates a new instance of the InfoSniperGeolocationService with the specified API Key
Constants
ERROR_FETCHING_IP_INFO
public
mixed
ERROR_FETCHING_IP_INFO
= "error_fetching_ip_info"
ERROR_INVALID_API_KEY
public
mixed
ERROR_INVALID_API_KEY
= "invalid_api_key"
ERROR_PARSING_XML
public
mixed
ERROR_PARSING_XML
= "error_parsing_xml"
ERROR_QUOTA_EXCEEDED
public
mixed
ERROR_QUOTA_EXCEEDED
= "quota_exceeded"
Properties
$apiKey
private
mixed
$apiKey
Methods
__construct()
public
__construct(mixed $apiKey) : mixed
Parameters
- $apiKey : mixed
bulkGeocodeIPs()
Geocodes multiple IP Addresses
public
bulkGeocodeIPs(mixed $ips) : null|array<string|int, mixed>
Parameters
- $ips : mixed
-
The IP Addresses to geocode
Return values
null|array<string|int, mixed>fetchIpInfo()
public
fetchIpInfo(mixed $ipAddress, mixed $apiKey, mixed &$error) : SimpleXMLElement|null
Parameters
- $ipAddress : mixed
- $apiKey : mixed
- $error : mixed
Return values
SimpleXMLElement|nullgeocodeIP()
Geocodes an IP Address
public
geocodeIP(mixed $ip) : null|IPGeocoderData
Parameters
- $ip : mixed
-
The IP Address to geocode
Return values
null|IPGeocoderDatawithApiKey()
Creates a new instance of the InfoSniperGeolocationService with the specified API Key
public
static withApiKey(mixed $apiKey) : InfoSniperGeolocationService
Parameters
- $apiKey : mixed
-
The API Key for InfoSniper.net