0
我是geoplugin.class將CA用戶重定向到特定鏈接。使用Geoplugin旋轉鏈接
現在,代碼只允許我將用戶重定向到1個網站。我想修改這個代碼,這樣我就可以將用戶重定向到任何
link1.com
link2.com
link3.com
有沒有人有一個快速的修改?
預先感謝您。
<?php
require_once('geoplugin.class.php');
$geoplugin = new geoPlugin();
$geoplugin->locate();
$geo_region = $geoplugin->region;
switch($geo_region) {
case 'CA':
header('Location: http://www.link1.com');
exit;
default: // exceptions
header('Location: http://www.everyoneelsegoeshere.com');
exit;
}
?>