Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Get country and city by IP

Posted on 2014-04-04
5
Medium Priority
?
509 Views
Last Modified: 2014-04-11
Hello, I need to be able to get the country and city of a website's visitors by IP through a service paid or free (obviously better if it's free) accurately. I if have to download some database files instead of using a service it could work too.

I'm using php, thanks so much.
0
Comment
Question by:ivanblue
[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 37

Assisted Solution

by:bbao
bbao earned 500 total points
ID: 39979583
FYI -  free access to the latest in IP geolocation databases is now available in GeoLite2 Database below.

http://dev.maxmind.com/geoip/legacy/geolite/
0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39979591
I have been using  http://smart-ip.net and it seems pretty accurate.   You wouldn't want to buy or download a list, that would be too hard to manage.  There are api's to make your life easy.  With low volume they will be free and higher volume you may have to pay.


The smart-ip.net API docs are easy to read http://smart-ip.net/geoip-api

dim theIP
theIP = xx.xx.xx.xx
http://smart-ip.net/geoip-xml/"&theIP
0
 
LVL 17

Assisted Solution

by:Kent Dyer
Kent Dyer earned 500 total points
ID: 39979652
Maxmind
IpChicken
What is my IP

I know what is my IP have APIs exposed for you to work with

ARIN Whois may have some exposed API calls available too
0
 
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 500 total points
ID: 39979701
I use Maxmind myself but you should know that IP addresses belong to Internet Service Providers and their locations are what you are going to get.  When it tries to locate me, it brings up one of two locations for my ISP, one is about 10 miles northeast and two towns over and the other is 30 miles south and at least two towns distant.
0
 
LVL 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39979747
Exactly, some of the IP services have different variances of error.  Some services have these variances built in where the free version is kind of close and the paid is scary close.  

It has been a while, but I unscientifically tested a few services and for the areas that I care about.  Smart-ip seemed to have a good accuracy to price (free) ratio for me but your milage will vary.

It's good to test a few services.   But do use an API.
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

721 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