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
3
votes
3 answers

Rails 4 - How would I automatically detect a user's location and display it on the web app?

I currently have a working app and I would like to have Rails detect a visitor's location by the IP address and display the city and state on the homepage of my website. For example, it would display "Hello {Name} from City, State". Visitors do not…
Henry Lee
  • 731
  • 2
  • 8
  • 15
3
votes
1 answer

PHP Redirect just once with GeoIp2

I am using MaxMind's GeoIp2 PHP to redirect website visitors based on their country. I have managed to get the redirect working so that: US visitors go to http://www.example.com/us Malaysian visitors go to http://www.example.com/my All other…
Leb
  • 117
  • 1
  • 9
3
votes
0 answers

GeoIP elasticsearch without logstash?

Is it possible to configure or set elastic GeoIP without logstash ? If it is, can you provide me some resources or show me how to do it ? Thanks.
Kamil
  • 990
  • 1
  • 7
  • 24
3
votes
2 answers

Getting IPv6 support with php5-geoip and Maxmind database

I have geoip setup by following these identical steps (http://php.net/manual/en/geoip.setup.php): wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz gunzip GeoLiteCity.dat.gz sudo mkdir -v /usr/share/GeoIP sudo mv -v…
user1026996
3
votes
3 answers

geo_ip.js is not working

I am using "http://j.maxmind.com/app/geoip.js" for multilingual site support but this link is throwing 404 error. Here is the error Failed to load resource: the server responded with a status of 404 (Not Found) www.globalenglish.com/:913 Uncaught…
Hitesh
  • 4,098
  • 11
  • 44
  • 82
3
votes
2 answers

Call reference for country in GeoLite2 using PHP

I'm trying to use the free MaxMind GeoLite2 code to be able to determine the country of a specific IP address. I am using the Composer-free method that was posted here: Get a localized name of the users city via Maxmind GeoLite2 Free I'm sure its…
Mark
  • 739
  • 1
  • 9
  • 15
3
votes
1 answer

How to configure GeoIP on a shared server?

I want to configure GeoIP to redirect domain to a subdomains according to country IP address in a shared server. I have created a custom php.ini to import geoip.so then in my index.php I added this code:
Mustapha Aoussar
  • 5,833
  • 15
  • 62
  • 107
3
votes
2 answers

Nginx geo ip module doesn't work, cannot find a way to debug

I follow nginx geoip configuration guide here http://www.howtoforge.com/nginx-how-to-block-visitors-by-country-with-the-geoip-module-debian-ubuntu I write something like this geoip_country /path/to/GeoIP.dat; I am pretty sure the .dat file is…
Fang-Pen Lin
  • 13,420
  • 15
  • 66
  • 96
3
votes
1 answer

How Do I Redirect Using Freegeoip.net Based On Country?

I would like to redirect visitors from and to a specific page within my website if those visitors are from any other country besides the United States, using freegeoip.net I am a relative beginner to coding and I wasn't able execute the code on this…
Lucardya
  • 31
  • 3
3
votes
0 answers

Move to GeoLite2 Free

I currently use GeoLite Free with my awstats analytics. I would like to start using GeoLite2 Free. What do I need to do to move from GeolLite to GeoLite2? I am assuming the format changed, so something in awstats needs to change perhaps? I use…
FAA
  • 179
  • 11
3
votes
3 answers

MaxMind GeoIP libraries and database on Amazon Elastic Beanstalk

I'm trying to figure out how to install and use GeoIP libraries on AWS (Elastic Beanstalk). As far I know EB has an "ephemeral filesystem", but I could store the CeoCity binary in S3… but what about MaxMind C libraries? Has anyone configured EB to…
daveoncode
  • 18,900
  • 15
  • 104
  • 159
3
votes
4 answers

How to get IP address / location of connecting visitors to my website, and show THEIR addresses to me?

i am looking for help in this problem. I know how to get IPv4 address in PHP code, like this: $ip = $_SERVER['REMOTE_ADDR']; this is what i found as answer for many questions like this here, but if i go to the website, it only shows MY ip address,…
Pixel1002
  • 186
  • 1
  • 2
  • 12
3
votes
0 answers

How to Convert a Maxmind .DAT to CSV?

Found on the Internet latest base Maxmind GeoIP Organization. But it is in binary form. How can I convert this database to CSV or another format for export to mysql or sqlite? I need to see all the data in a readable form. p.s. OS - Windows.
user2652795
  • 31
  • 1
  • 2
3
votes
2 answers

best way to redirect domain based on ip address (country) in Django

We have 2 stores which are XXXXXX.com and XXXXXX.com.mx, I'd like to allow only US IPs go to XXXXXX.com any other IPs need to route to XXXXXX.com.mx We used to use Limelight for routing but we're no longer using them then we decided to do it by…
Alireza Seifi
  • 135
  • 3
  • 11
3
votes
2 answers

Why does geoip throw an exception?

Why this code: geoip_country_code_by_name('unknown'); generate ErrorException, when must return false ?
maxim.u
  • 331
  • 2
  • 9