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
5
votes
1 answer

Maxmind list all cities in a state

I am using maxmind node module to interact with the maxmind database. What I am trying to achieve is to get a list of all cities under specific state/country. The code is as follow. var maxmind =…
Adeel Tahir
  • 187
  • 2
  • 10
5
votes
3 answers

How create GeoIP functionality in PHP project?

I have some IP adress ($_SERVER['REMOTE_ADDR']) and I must receive (learn) name of country and it would be nice if I can receive (learn) name of city too. And don't forget It's php-project, useful API - very good. P.S. It's some open-source project…
NiLL
  • 13,645
  • 14
  • 46
  • 59
5
votes
1 answer

GeoLite2 Country List Of Codes

In the GeoLite2 Country database does anyone know if a list of the two character country/organisation codes can be found anywhere or what source its using?
User666
  • 121
  • 1
  • 10
5
votes
1 answer

geoip-database[-extra] vs geoip-database-contrib

While installing geoip I get the dependency conflict. I can install either geoip-database and geoip-database-extra packages, or geoip-database-contrib. I couldn't notice any difference between them, both works fine as you see here So, is there any…
5
votes
2 answers

Is nginx reload enough when updating GeoIP.dat

I use nginx with geo_module for MaxMind GeoIP paid DB. I put a cron script, which downloads a fresh MaxMind GeoIP paid DB every week and replaces the old GeoIP.dat file with the new one. Is reloading the service after the replacement enough or do I…
Valentin Stoianoff
  • 187
  • 3
  • 3
  • 11
5
votes
1 answer

How can I get US State from GeoIP2?

Is there any way, how to get US state abbr. (CA, VI, ..) from IP? The library return me only metro code and postal code, is there any lookup table to state convertor? Or how do you extract the state?
mvorisek
  • 3,290
  • 2
  • 18
  • 53
5
votes
3 answers

PHP Regex for IP to Location API

How would I use Regex to get the information on a IP to Location API This is the API http://ipinfodb.com/ip_query.php?ip=74.125.45.100 I would need to get the Country Name, Region/State, and City. I tried this: $ip =…
xZerox
  • 331
  • 4
  • 7
  • 21
5
votes
3 answers

Apache 2.4 require not ip range not working (blacklist ignored when GEOIP active)

I'm trying to understand what's going on. If i add a single IP to my blacklist using Require not ip xxx.xxx.xxx.xxx It just works, Apache 2.4 throws a 403. Now i've tried to use the whole range and it still let the request go through. I…
Eric
  • 9,870
  • 14
  • 66
  • 102
5
votes
2 answers

How do I use MaxMind's Databases in php

I downloaded and extracted GeoLite2-City.mmdb, GeoLite2-Country.mmdb. Both are in htdocs\geoip\ Then, I ran this script. Trouble is, how does this thing work? What is require_once 'vendor/autoload.php'; supposed to contain? Am I missing anything…
Norman
  • 6,159
  • 23
  • 88
  • 141
5
votes
3 answers

Importing the latest MaxMind GeoLite2 database into MySQL

MaxMind is now offering a GeoLite2 DB as described on their site. The trouble is that they no longer offer CSV download, only a binary MMDB binary database format. I can't find anything online about how to unmangle the MMDB format and install it…
xeo
  • 807
  • 2
  • 7
  • 25
5
votes
3 answers

How accurate is GeoIP and $_SERVER['REMOTE_ADDR']?

I make a website for my girlfriend and she recently wants to know who is accessing her site. So I use the database of MindMax and I got the list and count of access by country. However, after monitoring it for a few days, it is comes to our surprise…
NawaMan
  • 25,129
  • 10
  • 51
  • 77
5
votes
1 answer

What do the various MaxMind GeoIP caching modes do/mean?

I'm trying to use the MaxMind GeoIP database, and I notice that the C API provides a bunch of different cacheing modes as flags to the GeoIP_open initialization call. GEOIP_MEMORY_CACHE GEOIP_CHECK_CACHE GEOIP_INDEX_CACHE GEOIP_MMAP_CACHE these…
Chris Dodd
  • 119,907
  • 13
  • 134
  • 226
5
votes
2 answers

GeoIP for C++ is there a lib for this?

I have looked and looked and I can't seen to find a C++ version of GeoIP. I know there is a version of it in C, but I can't seem to get it working with Micosoft Visual Studio 2012 C++ I have tried: Compile Maxmind C library with visual studio…
Jork449
  • 97
  • 2
  • 6
5
votes
1 answer

Fatal error call to undefined function geoip_open()

I have installed the geoip for getting the address based on the remote_server ip in php. I have installed the Geoip package in my system and also i have installed the php5-geoip php extension. But while running the following script it is showing the…
Kalaiyarasan
  • 12,134
  • 8
  • 31
  • 49
5
votes
1 answer

Pass parameters to Python Flask via UWSGI / NGINX

I am trying to use the GeoIP module with my Nginx and Uwsgi stack. All the tutorials relate to using it with fastcgi, but since I dont use fastcgi it doesnt help. I need to get nginx to pass GeoIP data into your CGI app via custom HTTP headers,…
Jimmy
  • 12,087
  • 28
  • 102
  • 192
1 2
3
46 47