Solved

get city and state from ip address

Posted on 2016-10-20
5
40 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 28

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 58

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 28

Expert Comment

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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

636 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