Hi
try this Example to Find IP and IP Location:-
1. Create new website project and Go to solution explorer.
2. Right-click on your project name
3. Click on ‘Add Web Reference’
4. Enter this address: http://tools.webmastermafia.com/GeoIPChecker.asmx
5. Drow some Button control and TextBox Control named txtIP
6. Enter this code into button_click event:
C#:
com.webmastermafia.tools.GeoIPChecker GEO = new com.webmastermafia.tools.GeoIPChecker();
lblResult.Text = GEO.GetCountry(“test@webmastermafia.com”, “test”, txtIP.Text, “CountryName”);
Visual Basic:
Dim GEO As com.webmastermafia.tools.GeoIPChecker = new com.webmastermafia.tools.GeoIPChecker();
lblResult.Text = GEO.GetCountry(“test@webmastermafia.com”, “test”, txtIP.Text, “CountryName”)
This is for check country name by IP. If you want to check City name, than use this code:
C#:
com.webmastermafia.tools.GeoIPChecker GEO = new com.webmastermafia.tools.GeoIPChecker();
lblResult.Text = GEO.GetCity(“test@webmastermafia.com”, “test”, txtIP.Text, “City”);
Visual Basic:
Dim GEO As com.webmastermafia.tools.GeoIPChecker = new com.webmastermafia.tools.GeoIPChecker();
lblResult.Text = GEO.GetCity(“test@webmastermafia.com”, “test”, txtIP.Text, “City”)
Hope this helps
Good Luck.
If you are looking for ip address and location detection then you can refer to below link.
http://tejji.com/ip/myipaddress.aspx
Comment by tejji — November 11, 2009 @ 2:45 am