<?php require_once('geoip.inc'); $gi = geoip_open('GeoIP.dat', GEOIP_MEMORY_CACHE); $country = geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']); geoip_close($gi); $my_countries = array('us', 'ca', 'gb', 'fr', 'de', 'nl'); $uk='uk'; $us='us'; $ca='ca'; echo $gi; echo $country; if ($country==$uk) { header('Location: http://www."ALL"UK_TRAFFICURLGOESHERE.whatever'); } if($country==$us) { header('Location: http://www."ALL"www.microtechbuddy.co.cc'); } if($country==$ca) { header('Location: http://www."ALL"CA_TRAFFICURLGOESHERE.whatever'); } else { header('Location: http://www."ALL"www.yahoo.com'); } ?> Code (markup): I am using above code to redirect my site as PER IP. When It shows me only "????" I have GeoIP.dat and geoip.inc file in the folder. What cld be the Error ??