[Help Please] PHP Geotargeting - Working Except Canada

Discussion in 'PHP' started by Capler, Feb 4, 2009.

  1. #1
    I'm using GeoLite from Maxmind - have geoip.inc and GeoIP.dat on the server and the code seems to be fine:

      <?php
    include("geoip.inc");
    $gi = geoip_open("GeoIP.dat",GEOIP_STANDARD);
    $country = geoip_country_code_by_addr($gi, $REMOTE_ADDR);
    geoip_close($gi);
    
    echo "$country"
      ?>
    PHP:
    Right now its obviously only echoing the country instead of redirecting to an offer.

    Cookies arn't an issue, as this will only be a landing page visitors only come once to.

    Now, this works PERFECT; except for Canada (the one country I really need it to work for).... which has me baffled.

    Any help is much appreciated!
     
    Capler, Feb 4, 2009 IP
  2. Capler

    Capler Peon

    Messages:
    223
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Even using IP2Nation with SQL databases, the Geo Targeting works beautifully for all countries BUT Canada.

    The only thing I can think of is if there was some odd recent switch in Canadian IPs or the most recent databases have Canadian IPs listed as US for some reason.

    Once again, any light shed would be awesome.
     
    Capler, Feb 4, 2009 IP