Hello,
Tried the following geolite MaxMind and it redirected all my traffic to the redirect URL instead of just DE traffic. I just want DE (German) traffic redirected right now and if not DE continue on.
<?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('de');
if (!in_array(strtolower($country), $my_countries))
{
header('Location:
http://www.google.com);
}
exit;
}
?>
Got the code from here:
http://www.warriorforum.com/programm...s-country.html
Help!
(-: