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
209
votes
20 answers

Getting the location from an IP address

I want to retrieve information like the city, state, and country of a visitor from their IP address, so that I can customize my web page according to their location. Is there a good and reliable way to do this in PHP? I am using JavaScript for…
krishna Kant
92
votes
17 answers

Get Country of IP Address with PHP

Ideally I'm trying to put together a PHP script that I can query from any web browser and it returns the country of the IP address that accessed the PHP script. Is this possible or is there a better solution?
Tristan
  • 3,845
  • 5
  • 35
  • 58
73
votes
13 answers

Identifying country by IP address

Is there a way to figure out the country name just by looking at an IP address? I mean, do countries have specific ranges of IP addresses? For example, Australia can have IP addresses only in the range of 123.45.56.89 - 231.54.65.98 (just an…
skos
  • 4,102
  • 8
  • 36
  • 59
36
votes
4 answers

How to enable dynamic module with an existing NGINX installation

Introduction From NGINX version 1.9.11 and upwarts, a new feature is introduced: dynamic modules. With dynamic modules, you can optionally load separate shared object files at runtime as modules – both third-party modules and some native NGINX…
yoano
  • 1,466
  • 2
  • 16
  • 20
29
votes
4 answers

How to Convert a Maxmind .MMDB to .DAT?

How to convert MaxMinds MMDB GeoIP to DAT format so that I can use with modsecurity+Apache. Modsecurity supports only DAT format.
Dev3182805
  • 291
  • 1
  • 3
  • 3
23
votes
4 answers

Geo Location based on IP Address - PHP

We're looking for a fast and accurate way to get the visitors location based on their IP. We have tried ipinfodb.com but their API made our website severely lag when making the API call. What other services do you suggest?
Latox
  • 4,655
  • 15
  • 48
  • 74
19
votes
2 answers

Installing custom builds heroku and issue with Library paths

I'm attempting to install a custom build on heroku, so I'm using a variety of ways to attempt a third part installing using the buildpacks. In my .buildpacks file I…
disruptive
  • 5,687
  • 15
  • 71
  • 135
16
votes
2 answers

Is there a node.js module that can determine Geolocation of an IP?

Give an IP, is there a node.js module that can determine what city and state it is in?
TIMEX
  • 259,804
  • 351
  • 777
  • 1,080
15
votes
2 answers

Where does MaxMind get its data and how can you access it?

From what sources does geolocation databases like http://www.maxmind.com/ get its data? As i have understood it the IP registry places like ARIN and RIPE just hold information about what company is assigned the IP range so it has to be from the…
Sultanen
  • 3,084
  • 5
  • 25
  • 46
14
votes
2 answers

htaccess rewrite rules with mod_GeoIP

I'm having some issues with mod_geoip for an ecommerce site that has 3 different stores. We have our main store at root/store, but also have have stores at root/ukstore and root/austore. The main root/store contains a /skin, /media, and /js…
coloradohiker
  • 221
  • 3
  • 11
14
votes
5 answers

Get Cloudflare's HTTP_CF_IPCOUNTRY header with javascript?

There are many SO questions how to get http headers with javascript, but for some reason they don't show up HTTP_CF_IPCOUNTRY header. If I try to do with php echo $_SERVER["HTTP_CF_IPCOUNTRY"];, it works, so CF is working just fine. Is it possible…
Badr Hari
  • 8,114
  • 18
  • 67
  • 100
13
votes
5 answers

GeoIP.dat.gz and GeoLiteCity.dat.gz not longer available? Getting 404 trying to load it

Started couple days ago i can't download http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz databases which i use to enable ngx_http_geoip_module…
Chauskin Rodion
  • 1,204
  • 1
  • 11
  • 13
12
votes
1 answer

Only allow certain countries traffic access specific page

I am using --with-http_geoip_module for identify traffic. There are some pages that I only want certain country to access. Here is configuration: For http http{ geoip_country /usr/share/GeoIP/GeoIP.dat; # the country IP database map…
dev-jim
  • 2,404
  • 6
  • 35
  • 61
11
votes
3 answers

How to improve performance of GeoIP query in BigQuery?

I have loaded my application logs in BigQuery and I need to calculate country based on IP address from those logs. I have written a join query between my table and a GeoIP mapping table that I downloaded from MaxMind. An ideal query would be OUTER…
N.N.
  • 3,094
  • 21
  • 41
10
votes
3 answers

GeoIPCity.dat file where do I find it?

I have a file GeoIPCity.day on one of my sites. The original developer told me it was a free file from maxmind.com and I should update it every month. I have looked on maxmind.com and haven't been able to find a file with the exact same name. Any…
Ron
  • 331
  • 1
  • 3
  • 12
1
2 3
46 47