Questions tagged [geoip]

GeoIP is the process of analyzing an IP address and determining the geographical location of that end point.

GeoIP assigns a location to an IP address, generally by doing a lookup in a specifically created database. Popular providers are MaxMind, Google, InfoSniper, and IP2Location. These, in turn, are based on Regional Internet Registries (RIR).

Common uses for this location information include:

  • Selecting the closest mirror for a download
  • Providing region specific billing information (currency, shipping cost)
  • Regionalizing the content of a page (local deals or specials)
694 questions
4
votes
4 answers

Incorrect results from geoLite2 IP database

Searching for IP 54.73.154.147 using latest GeoLite2 IP database I get the following results: Seattle, US, United States But the IP address is actually from a AWS server spun up in Ireland. If I submit the same IP to the GeoIP Precision test page…
beterthanlife
  • 1,668
  • 2
  • 18
  • 30
4
votes
1 answer

Continuously decreasing accuracy of maxmind geolite city

We've been using awstats together with Maxmind's GeoLite City (now GeoLite Legacy City) database for website statistics of a non-profit organization. The percentage of unknown cities (the ones not found in the database) has long been at some 15 -…
sang
  • 41
  • 1
  • 2
4
votes
1 answer

Install GeoIP on Windows?

Does anybody know how to install GeoIP's C library on Windows in a few simple steps. Even a few complicated steps will do. I researched and tried to compile it from the setup file but failed several times. Sometimes, I get errors saying that GeoIP.h…
Sunjay Varma
  • 5,007
  • 6
  • 34
  • 51
4
votes
2 answers

Querying GeoLite2 Country CSV in SQL

Does anyone know how to look up an IP4 address from MaxMind's GeoLite2 Country CSV using SQL? I have been using MaxMind's free GeoIP data for many years, and would like to upgrade to their GeoLite2 data. I have the blocks and locations data loaded…
4
votes
0 answers

How to generate random IP address of a specific country

I was wondering if there is a way to use GeoIP gem and generate a random IP-address of a specific country. Something like GeopIP.random_ip('IN') should output '183.82.121.911'. Any help.
Satya Kalluri
  • 5,148
  • 4
  • 28
  • 37
4
votes
2 answers

What data areaCode and metroCode columns contain for in maxmind?

As i inderstand area code - is regional telephone code, right? What for metro code column stays for then?
avasin
  • 9,186
  • 18
  • 80
  • 127
4
votes
1 answer

Installing C library in Heroku

I'm trying to use GeoIP with Django. It requires the MaxMind GeoIP C API. If I were using Ruby, I could simply use the 'geoip' gem which bundles the C API and the Ruby bindings, as explained in Installing MaxMind GeoIP ruby library on…
jpulgarin
  • 103
  • 5
4
votes
2 answers

How does the binary DAT from Maxmind work?

Maxmind offers a binary DAT file format for downloading their GeoIP database. http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz Does anyone know how this has been packaged? Also, is there any kind of copy protection on the…
Rich
4
votes
1 answer

Maxmind geoip query in delphi

I'm looking to query the geoip database (city, country, org) for a bunch of IP addresses. I looked at http://www.maxmind.com/download/geoip/api/pascal/Sample.pas and modified it: function LookupCountry(IPAddr: string) : string; var GeoIP:…
asg2012
  • 315
  • 1
  • 6
  • 15
3
votes
2 answers

what maxmind geoip ruby wrapper is up2date and usable? ( for the commercial library )

Im trying to get below github repo in my app https://github.com/mtodd/geoip Ive tried adding it like gem "geoip", :git => "git://github.com/mtodd/geoip.git" Error = Could not find gem 'geoip (>= 0) ruby' in git://github.com/mtodd/geoip.git (at…
Rubytastic
  • 15,001
  • 18
  • 87
  • 175
3
votes
1 answer

Caching MaxMind City bindary database in RAM + Server performance

I've been trying to find a proper GeoIP database for our application and as far as I can tell MaxMind City is probably the best (though if I'm wrong please let me know!). I'm currently trying out the free version which isn't really accurate in the…
Ignas
  • 1,965
  • 2
  • 17
  • 44
3
votes
2 answers

Drupal only display certain content based on location

I need to be able to only display certain content/nodes based on where a user is located in the world. For example, if the user is from the US, they should see different results than someone from Europe. Ideally I would be able to tag each node with…
betamax
  • 13,431
  • 9
  • 38
  • 55
3
votes
3 answers

geoIP find country from ASP.NET

From an ASP.NET page I'm able to retrieve the client's IP address (at least the apparent one). I would like to know if there is a free service that I can access from code-behind, that will return the country (no need for city) when queried with the…
Didier Levy
  • 3,393
  • 9
  • 35
  • 57
3
votes
2 answers

How to do a geoip lookup in php?

All tutorials I have seen have pointed towards functions like geoip_record_by_name. I always get this error: Fatal error: Call to undefined function geoip_record_by_name() in /home//public_html/geoip.php on line I'm on "shared" hosting,…
Cyclone
  • 17,939
  • 45
  • 124
  • 193
3
votes
1 answer

find people within X miles of my city

I am working on a dating application in PHP: My application has a search page that searches suitable user profiles within certain distance of a person's location (need to specify the no. of miles/kms to search for). I understand the logic to…
Sunil Silumala
  • 917
  • 5
  • 22