More Features added to Geolocation API
This commit is contained in:
@@ -2222,12 +2222,9 @@ function geoLocationForm() {
|
|||||||
$ispTextBox.Clear()
|
$ispTextBox.Clear()
|
||||||
$countryTextBox.Clear()
|
$countryTextBox.Clear()
|
||||||
$ipToSearch = $ipSearchBox.Text
|
$ipToSearch = $ipSearchBox.Text
|
||||||
$response = Invoke-RestMethod -Method GET -URI "http://ip-api.com/json/$ipToSearch"
|
$response = Invoke-RestMethod -Method GET -URI "https://api.iplocation.net/?ip=$ipToSearch"
|
||||||
$ispTextBox.Text = $response.isp
|
$ispTextBox.Text = $response.ISP
|
||||||
$countryTextBox.Text = $response.country
|
$countryTextBox.Text = $response.Country_Name
|
||||||
$stateTextBox.Text = $response.regionName
|
|
||||||
$cityTextBox.Text = $response.city
|
|
||||||
|
|
||||||
}
|
}
|
||||||
$geoLocationFormBox.ShowDialog()
|
$geoLocationFormBox.ShowDialog()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user