Solved

How to get country, country code and city name by IP address in C#?

Posted on 2009-07-10
5
2,473 Views
Last Modified: 2012-06-27
How to get country, country code and city name by IP address in C#?
0
Comment
Question by:PapaStrumpf
  • 3
5 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 24820962
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 24820963
You can get the IP Address by - Request.ServerVariables("REMOTE_ADDR")

You can download the Ip-to-country database from: http://ip-to-country.webhosting.info/

and the country information database from: http://www.nabeelakhtar.net/devzone/db_details_index.php?dev=8

SourceForge link to the Country Information Database is: http://sourceforge.net/projects/countrydb/

0
 
LVL 53

Expert Comment

by:Dhaest
ID: 24820965
IPAddressExtensions - extending the System.Net.IPAddress class
http://www.codeplex.com/IPAddressExtensions

Information provided
Country name (eg. Australia)
Country ISO 3166 2-Code (eg. AU)
Country ISO 3166 3-Code (eg. AUS)
Registry. (eg. APNIC)
Date the IP Address (range) was added to the data source (if known).

0
 
LVL 3

Expert Comment

by:coagantus
ID: 24820966
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now