I\'m geoplugin.class to redirect CA users to a specific link.
Right now the code only allows me to redirect the user to 1 website. I would like to modify this code so I
Try This one:
require_once('geoplugin.class.php');
$geoplugin = new geoPlugin();
$geoplugin->locate();
$geo_region = $geoplugin->region;
switch($geo_region) {
case 'CA':
$links = array('link1.com','link2.com','link3.com');
header('Location: http://'.$links[array_rand($links)]);
exit;
default: // exceptions
header('Location: http://www.everyoneelsegoeshere.com');
exit;
}