By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,838 Members | 1,623 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,838 IT Pros & Developers. It's quick & easy.

How to find Geographic location thru IP address

P: n/a
Hi,

I have IP Addresses in my DB table. I want to find the geographic location of each IP address. Can anyone help me if there is any API or solution for this.

Thanks in advance.
Oct 7 '08 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On Tue, 07 Oct 2008 02:59:02 -0700, Narasimha <Raowrote:
I have IP Addresses in my DB table. I want to find the geographic
location of each IP address. Can anyone help me if there is any API or
solution for this.
There certainly is not any way built into C# or .NET.

You might try using Google to find resources for this sort of thing. But
generally, this is the sort of thing that you pay a commercial business to
provide the database for. Not only is it not built into C# or .NET, it's
not even built into the Internet.

If you wanted to do the work yourself, you could write software to build
up a database yourself based on the whois information, correlating
registered addresses for IP range owners with a map database. But even
that isn't going to be 100% accurate, and may not even be as accurate as a
hand-tuned database generated for commercial purposes. Unless you have
some particular academic interest in the topic, you're probably better off
just paying someone else to do the work.

Pete
Oct 7 '08 #2

P: n/a
Narasimha Rao skrev:
Hi,

I have IP Addresses in my DB table. I want to find the geographic location of each IP address. Can anyone help me if there is any API or solution for this.

Thanks in advance.
http://whatismyipaddress.com/
is one example.
--
Bjørn Brox
Oct 7 '08 #3

P: n/a
That one and others I suspect are as accurate as the internet providers can
be. For example, I live in a somewhat sparsely populated area. It shows
the location as off by about 8 miles. It depends on the accuracy needed I
guess.

"Bjørn Brox" <bp****@gmail.comwrote in message
news:48********@news.broadpark.no...
Narasimha Rao skrev:
>Hi, I have IP Addresses in my DB table. I want to find the geographic
location of each IP address. Can anyone help me if there is any API or
solution for this.

Thanks in advance.

http://whatismyipaddress.com/
is one example.
--
Bjørn Brox
Oct 7 '08 #4

P: n/a
On Tue, 07 Oct 2008 05:28:05 -0700, Family Tree Mike
<Fa************@thisoldhouse.comwrote:
That one and others I suspect are as accurate as the internet providers
can be. For example, I live in a somewhat sparsely populated area. It
shows the location as off by about 8 miles. It depends on the accuracy
needed I guess.
Well, to the extent that is the issue one is dealing with, yes. But
because of the way the location information is obtained, it's not just a
matter of accuracy and being off by some limited number of miles. The IP
address seen for a user may or may not be the IP address for the computer
the user is actually using, and may or may not be associated with the
geographical location of the computer assigned that IP address.

If you look at the web site Bjørn referenced, on their own informational
page (http://whatismyipaddress.com/staticp....php/lookup-ip) they
state that worldwide, only 60% of the time will the location provided be
with 25 miles of the user's actual location. Of the 40% that isn't within
that range, a large proportion of that is probably IP addresses that just
aren't logically related to geographical location at all.

As long as one understands the limitations of this approach, that's fine.
But you can see that even for a commercial enterprise, getting accurate
numbers is extremely difficult. Replicating even that degree of accuracy
may not be practical without some sort of well-defined business model to
justify the effort.

Pete
Oct 7 '08 #5

P: n/a
Narasimha Rao wrote:
I have IP Addresses in my DB table. I want to find the geographic
location of each IP address. Can anyone help me if there is any API
or solution for this.
There are both commercial and providers of such service.

You should note that none of them is 100% correct.

Usually in the high 90's for country and low 90's
for region/city.

The free ones include:
* http://ip-to-country.webhosting.info/
* http://www.maxmind.com/app/geoip_country

I have C# code for loading a local copy of
the databases and query it. Email me if interested.

Arne
Oct 8 '08 #6

P: n/a
You can get the geolocation .NET control from IP2Location with
database subscription service.

http://www.ip2location.com
Oct 21 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.