require_once('/home/freegif2/public_html/geo/geoip.inc'); $gi = geoip_open('/home/freegif2/public_html/geo/GeoIPCity.dat', GEOIP_MEMORY_CACHE); $country = geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']); geoip_close($gi); if ($country == 'US' || $country == 'GB' || $country == 'FR' || $country == 'CA') { echo "http://google.com"; } elseif ($country == 'HR' || $country == 'EE') { echo "http://google.fr"; } else { echo "http://google.ca"; }