I am developing an windows 8 app in C# And want to get Geo Coordinates of IP addresses or Want an API that can exactly or nearly geolocate the IP address in windows 8 app! Thanks in advance for your help!
Asked
Active
Viewed 8,804 times
2 Answers
14
Just use a web service here is free one 10000 requests per hour
http://freegeoip.net/static/index.html
REST Call http://freegeoip.net/xml/[your ip]
EDIT
Simple code to download from a url
using (var objClient = new System.Net.WebClient())
{
var strFile = objClient.DownloadString("http://freegeoip.net/xml/192.168.0.1");
}

Salah Akbari
- 39,330
- 10
- 79
- 109

Dreamwalker
- 3,032
- 4
- 30
- 60
-
Thanks! I think it would be helpful but i am new at API integration so would you please provide me complete code or some guide how to use it! – Bilal Haider Feb 20 '13 at 11:50
-
added some simple code you need to change the ip accordingly then process the result. – Dreamwalker Feb 20 '13 at 12:30
-
Good solution +1. But based on (freegeoip) *you're allowed up to 10,000 queries per hour by default.* I edited your post to fix the queries count. – Salah Akbari Jan 28 '17 at 11:32
-
2The link redirects to commercial service, their free tier is now 10 000 req/month – hultqvist Jul 27 '20 at 18:26
-1
If you type your question in any web search engine, this page is bound to come up: Windows 8 Geolocation sample in C#, VB.NET, C++, JavaScript for Visual Studio 2012. Download it, look at it, I'm sure it's helpful.

CodeCaster
- 147,647
- 23
- 218
- 272
-
Thanks brother! but that code give us the location from which it is called but i need geolocation for IPs given by me – Bilal Haider Feb 20 '13 at 11:48