$header = getallheaders(); $agent = $header["User-Agent"]; if(preg_match("#^DoCoMo#",$agent) || preg_match("#^SoftBank#",$agent) || preg_match("#^Vodafone#",$agent) || preg_match("#^J-PHONE#",$agent) || preg_match("#UP.Browser#",$agent)){ header("Location: http://xn--wgv71a119e.jp/mobile/"); exit; } ?>