New answers tagged

1

Since the question doesn't specify an OS, this is how to get that same information with PowerShell's curl (actually an alias of Invoke-WebRequest): (curl ipinfo.io).Content That produces a JSON string. To get the object that JSON represents, use ConvertFrom-Json: curl ipinfo.io | ConvertFrom-Json Since that's a PowerShell object, you can easily get ...


8

There's a service providing this: ipinfo.io. You can invoke it using curl. Example: curl ipinfo.io Result: { "ip": "...", "hostname": "...", "city": "...", "region": "...", "country": "...", "loc": "...,...", "org": "..." } A specific IP's info can also be requested: curl ipinfo.io/216.58.194.46: { "ip": "216.58.194.46", "hostname": ...



Top 50 recent answers are included