Maxmind Geo Problem

by 4 replies
5
Is anyone else having problems with this script recently? I just checked my Lps and where it used to have the city showing up, its now blank. I go into the link
http://j.maxmind.com/app/geoip.js and I get

function geoip_country_code() { return 'CA'; }
function geoip_country_name() { return 'Canada'; }
function geoip_city() { return ''; }
function geoip_region() { return ''; }
function geoip_region_name() { return ''; }
function geoip_latitude() { return '60.0000'; }
function geoip_longitude() { return '-95.0000'; }
function geoip_postal_code() { return ''; }
function geoip_area_code() { return ''; }
function geoip_metro_code() { return ''; }

Seems the city is missing, anyone else having this problem or is it just on my end?
#programming #geo #maxmind #problem
  • My city shows up just like it's supposed to.
    • [1] reply
    • I have ran into this issue I find that it is cause you have to update the file. They told me that it is something like 10% every month or something that the data is in correct also make sure the bots dont go threw the file it will make it corrupt.
  • Read the OP. He's not talking about the downloadable database. He's referring to the hosted javascript API.
  • i use this in apps and they are working fine

    also i clicked on the link and my city works

    the issue is the backend db at maxmind - it has limited accuracy

    my guess is your ip changed and they simply don't have city info in their db for that ip

    i use something like this to handle the issue:

    var city = geoip_city();
    var state = geoip_region_name();
    if( city != '' ){

    $('#manual_from').val(city);
    }
    else if( state != '' ) {

    $('#manual_from').val(state);
    }
    else{

    $('#manual_from').val(geoip_country_name());
    }

Next Topics on Trending Feed

  • 5

    Is anyone else having problems with this script recently? I just checked my Lps and where it used to have the city showing up, its now blank. I go into the link http://j.maxmind.com/app/geoip.js and I get