[WTF] Maxmind geo-IP database not working today?

Grandslam

BANNED
Joined
Apr 23, 2009
Messages
967
Reaction score
319
Anyone else noticing this? I have a redirect script set up using the Maxmind database and its been responding extremely slow today, and even worse, sometimes not at all.

Usually its so fast I miss it if I blink.

My status bar says "waiting for j.maxmind..." for at least 15 seconds and then it redirects or just freezes and the status bar goes to "Done" even though it hasn't successfully redirected. It just stops on the page I have the script set up on.

WTF is going on? I'm losing $ every minute their database is down... I'm scrambling for another solution/script that doesn't rely on their database for geo-IP redirects...
 
Yeah, I don't know what the fuck is up. My scripts keep breaking, and I'm wondering why, this is probably the reason.

EDIT: Are you using their free or paid license? If it's paid, that's totally fucked up.
 
Use their self-hosted version... This way you don't need to rely on their servers.
 
I'm using the self hosted version so I don't have any similar problem, I can suggest this self-hosted ver. to you coz its just pretty good ;)
 
Yeah, I don't know what the fuck is up. My scripts keep breaking, and I'm wondering why, this is probably the reason.

EDIT: Are you using their free or paid license? If it's paid, that's totally fucked up.

Free. Still fucked up nevertheless.

Use their self-hosted version... This way you don't need to rely on their servers.

I'm using the self hosted version so I don't have any similar problem, I can suggest this self-hosted ver. to you coz its just pretty good ;)

1. How much does it cost?

2. Where do I go on their site to get it?
 
#1 - Download this file and unzip:
Code:
http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

#2 - Create a file named "geoip.inc". Go to the link and include the code:
Code:
http://geolite.maxmind.com/download/geoip/api/php/geoip.inc

#3 - Create a file named "geoipcity.inc". Go to the link and include the code:
Code:
http://geolite.maxmind.com/download/geoip/api/php/geoipcity.inc

#4 - *OPTIONAL* - If you want State/Region data, make a file called "geoipregionvars.php", then go to the link and include the code:
Code:
http://geolite.maxmind.com/download/geoip/api/php/geoipregionvars.php

#5 - Here is a demo version of the code (name file whatever you want):
Code:
http://geolite.maxmind.com/download/geoip/api/php/sample_city.php

#6 - Upload all of those files into the same folder on your website... Here is a sample code to redirect by country:
PHP:
<?php
    // include geo lookup
    include("geoip.inc");
    include("geoipcity.inc");
    include("geoipregionvars.php");

    // perform geo lookup
    $ip = $_SERVER['REMOTE_ADDR'];
    $gi = geoip_open("./GeoLiteCity.dat", GEOIP_STANDARD);
    $rsGeoData = geoip_record_by_addr($gi, $ip);

    // if USA
    if ($rsGeoData->country_code == "US") { 
    header('Location: http://www.google.com/');
    }
    // if Canada
    else if ($rsGeoData->country_code == "CA") {
    header('Location: http://www.yahoo.com/');
    }
    // all other countries
    else {
    header('Location: http://www.ask.com/');
    }
?>
 
Last edited:
Here is another solution:

http://www.maxmind.com/app/mod_geoip


apache mod which allows to use geoip redirection by a simple .htaccess file. Of course you also need the db saved locally...


example:

RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(US|UK)$
RewriteRule ^(.*)$ http://www.gohere.com$1 [L]



Have fun!
 
Back
Top