Archive
Posts Tagged ‘ip’
show my position on the map
June 21, 2016
Leave a comment
The site http://ipinfo.io/ gives you back not only your IP address, but your geolocation too. Example (with a fake IP):
$ curl http://ipinfo.io/
{
"ip": "734.675.653.542",
"hostname": "No Hostname",
"city": "Debrecen",
"region": "Debrecen",
"country": "HU",
"loc": "47.5333,21.6333",
"org": "...",
"postal": "..."
}
Let’s visualize my location:
<img src="https://maps.googleapis.com/maps/api/staticmap?center=47.5333,21.6333&zoom=9&size=480x240&sensor=false">
Debrecen, Hungary, center of the world :)
Categories: Uncategorized
geolocation, google map, ip, json