include("dbconnect.php"); function hanbetsu(){ $ua=$_SERVER['HTTP_USER_AGENT']; $ret = "P"; if((strstr($ua,"Android") && strstr($ua,"Mobile")) || ((strstr($ua,"iPhone") || strstr($ua,"iPod")) && !strstr($ua,"iPad"))){ $ret = "S"; }else if(strstr($ua,"iPad") || strstr($ua,"Android")){ $ret = "T"; }else{ if(strstr($ua,"DoCoMo")){ $ret = "K"; }elseif(strstr($ua,"Vodafone")){ $ret = "K"; }elseif(strstr($ua,"SoftBank")){ $ret = "K"; }elseif(strstr($ua,"MOT-")){ $ret = "K"; }elseif(strstr($ua,"J-PHONE")){ $ret = "K"; }elseif(strstr($ua,"KDDI")){ $ret = "K"; }elseif(strstr($ua,"UP.Browser")){ $ret = "K"; }elseif(strstr($ua,"WILLCOM")){ $ret = "K"; } } return $ret; } if(hanbetsu()=="S" || hanbetsu()=="T"){ header("Location: http://sp.fudousan.co.jp"); } ?>