📅  最后修改于: 2023-12-03 14:59:07.250000             🧑  作者: Mango
The IP Geolocation service provided by geoPlugin is a powerful tool for programmers to obtain geolocation information from an IP address. By making use of this service, you can extract valuable data about the location, country, region, city, latitude, longitude, and even the currency being used in a given IP address.
To access the IP Geolocation service, you can make a GET request to the following URL:
http://www.geoplugin.com/geolocation/<ip_address>.json
Replace <ip_address>
with the IP address you want to geolocate.
Let's take an example by geolocating the IP address 192.0.2.1
.
GET http://www.geoplugin.com/geolocation/192.0.2.1.json
{
"geoplugin_request": "192.0.2.1",
"geoplugin_status": 200,
"geoplugin_city": "Sample City",
"geoplugin_region": "Sample Region",
"geoplugin_areaCode": "123",
"geoplugin_dmaCode": "456",
"geoplugin_countryCode": "US",
"geoplugin_countryName": "United States",
"geoplugin_continentCode": "NA",
"geoplugin_latitude": "37.751",
"geoplugin_longitude": "-97.822",
"geoplugin_currencyCode": "USD",
"geoplugin_currencySymbol": "$",
"geoplugin_currencyConverter": 1
}
geoplugin_request
: The IP address being geolocated.geoplugin_status
: The status code indicating the success of the geolocation request.geoplugin_city
: The city where the IP address is located.geoplugin_region
: The region or state where the IP address is located.geoplugin_areaCode
: The area code associated with the IP address.geoplugin_dmaCode
: The DMA (Designated Market Area) code associated with the IP address.geoplugin_countryCode
: The country code of the IP address location.geoplugin_countryName
: The country name of the IP address location.geoplugin_continentCode
: The continent code where the IP address is located.geoplugin_latitude
: The latitude coordinate of the IP address location.geoplugin_longitude
: The longitude coordinate of the IP address location.geoplugin_currencyCode
: The currency code used in the IP address location.geoplugin_currencySymbol
: The symbol or HTML entity representing the currency symbol.geoplugin_currencyConverter
: The currency converter factor. (Usually set to 1 for the primary country currency)For more information, including additional endpoints and features offered by the geoPlugin service, please refer to the official geoPlugin website.
Note: This introduction is in Markdown format.