View Single Post
Old 01-13-2009, 11:48 AM  
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
what do you mean you want a button to switch to english?

<a href="/en/" title="Switch to English">Switch to English</a>

will suffice? or even a little British flag etc


For the geo stuff, download Maxmind's database and install as an apache module, then (in php)
if ($_SERVER['GEOIP_COUNTRY_CODE'] != 'BE') {
header("Location: /en/");
exit();
}

or if installing as apache modules boggles the brain to much, use geoplugin...

$geolocation_data = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip=xx.xx.xx.xx'));
if ($geolocation_data['geoplugin_countryCode'] != 'BE') {
header("Location: /en/");
exit();
}
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202

Last edited by borked; 01-13-2009 at 11:52 AM..
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote