1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest Last month we upgraded BlackHatWorld.com to a new platform - . If you notice anything that requires attention please start a new thread here.
    Dismiss Notice

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

Discussion in 'Black Hat SEO Tools' started by Grandslam, Aug 12, 2011.

  1. Grandslam

    Grandslam Senior Member

    Joined:
    Apr 23, 2009
    Messages:
    966
    Likes Received:
    313
    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...
     
  2. ``Yousef

    ``Yousef Power Member

    Joined:
    Oct 16, 2009
    Messages:
    534
    Likes Received:
    286
    Location:
    Cooking up the medicine.
    Home Page:
    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.
     
    • Thanks Thanks x 1
  3. xpwizard

    xpwizard Junior Member

    Joined:
    Nov 6, 2010
    Messages:
    198
    Likes Received:
    122
    Use their self-hosted version... This way you don't need to rely on their servers.
     
    • Thanks Thanks x 1
  4. Evan Foster

    Evan Foster Junior Member

    Joined:
    Mar 1, 2011
    Messages:
    168
    Likes Received:
    59
    Occupation:
    Remote Student
    I do not think if there is some better alternate to maxmind.
     
  5. copxxx

    copxxx Registered Member

    Joined:
    May 21, 2008
    Messages:
    56
    Likes Received:
    13
    Occupation:
    IT Advisor
    Location:
    Europe
    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 ;)
     
    • Thanks Thanks x 1
  6. Grandslam

    Grandslam Senior Member

    Joined:
    Apr 23, 2009
    Messages:
    966
    Likes Received:
    313
    Free. Still fucked up nevertheless.

    1. How much does it cost?

    2. Where do I go on their site to get it?
     
  7. xpwizard

    xpwizard Junior Member

    Joined:
    Nov 6, 2010
    Messages:
    198
    Likes Received:
    122
    #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/');
        }
    ?>
     
    • Thanks Thanks x 1
    Last edited: Aug 13, 2011
  8. markmaster

    markmaster Registered Member

    Joined:
    Apr 5, 2010
    Messages:
    53
    Likes Received:
    4
    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!