More Features added to Geolocation API

This commit is contained in:
brotoskyj
2024-12-30 23:10:54 -05:00
parent d8fc8efe23
commit 7af15f39d6
+3 -6
View File
@@ -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()