Solved

get city and state from ip address

Posted on 2016-10-20
5
36 Views
Last Modified: 2016-11-08
I know how to get ip address but I need to know how to get city and name by using javascript. not jquery
0
Comment
Question by:ITsolutionWizard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 200 total points (awarded by participants)
ID: 41853253
It's not available.  IP addresses are assigned to ISPs and hosting companies, not individuals.  While large companies like Google, Amazon, and Facebook keep massive databases that's let's them cross correlate info to identify individuals, they do not make that available to you.  Even getting other people's IP address has to be done on the server with a programming language.
1
 
LVL 27

Assisted Solution

by:Dr. Klahn
Dr. Klahn earned 100 total points (awarded by participants)
ID: 41853256
Dave is correct.  IP to geolocation data is not real good when it comes to quality.  Every web site that uses geolocation thinks I'm 60 miles away, and those sites are paying for commercial quality geolocation.  Usually the state is correct but I would trust it no further than that.

Aside from that, when someone goes through Tor or a VPN they can appear to be coming from anywhere in the world.
0
 
LVL 10

Assisted Solution

by:Jeffrey Dake
Jeffrey Dake earned 100 total points (awarded by participants)
ID: 41853267
http://dev.maxmind.com/geoip/geoip2/geolite2/ Here is where you can get a free database to get the city from the ip, all though it is not as accurate as the paid version. But usually when you see someone looking up the location by ip they are doing some sort of backend lookup into a database like this.
0
 
LVL 57

Assisted Solution

by:Julian Hansen
Julian Hansen earned 100 total points (awarded by participants)
ID: 41853422
I think with maxmind the difference between paid and free is granularity - data is as accurate you just get more with the paid version.

Another problem with GeoLocation is there is move toward using VPN's - people are jealous of their privacy. The question you need to answer is why do you want to get this information without asking your visitor for it.
0
 
LVL 27

Expert Comment

by:Dr. Klahn
ID: 41878465
EE email requested stale question closure.
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

759 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