Enjoy BYOND? Contribute today!
Getting someone's general geographic location via IP addres
Dec 31 2010, 8:44 pm
I want to know - is it possible to grab someone's general location, I.E. their country, just by knowing their IP address? This would be interesting to incorporate into BYOND games.
Dec 31 2010, 9:26 pm
Sometimes, sometimes not. Basically you look up the organisation the IP address is registered with, and their registered address or regional data. Which may be accurate to within the nearest country of the actual IP user, or maybe not.
For example I used to often come up being geo-located in Amsterdam, when I was in the UK.
Jan 1 2011, 8:20 pm
, download one of the MySQL databases, and read up on hub://Dantom.DB.
The databases offer 3- or 4-digit precision. If ipinfodb.com doesn't have enough precision or accuracy for your needs, or if you want more global ip-to-city coverage, you can use a commercial geolocation database, like
Jan 1 2011, 10:21 pm
All those little flash ads seem to tell you about the women in your area, so I'd say probably. You have to keep in mind that sometimes it'll be really innaccurate, especially if someone uses a VPN or similar service.
Jan 7 2011, 2:15 am
I've been told I'm from many different places by a lot games which try to do this. Once I was even told I was from London... You may as well just add an option to supply a location. Way easier and more accurate.
Jan 7 2011, 2:20 am
In response to
Well, usually data like geolocation is mostly used for demographic statistics. Nobody ever really expects it to be overly accurate, just general.
And of course there are instances when the data is just wrong, especially for people using services like mobile broadband where their IP is based on either the GPS location of the device or a manual "home address" entry, which allows them to set their central server to the nearest one, effectively changing their IP to one in that area. Which means they can have an IP from just about anywhere in the country at a whim.
Copyright © 2013 BYOND. All rights reserved.
Terms of Service