'yes' and `heaven` = '".$dir."'"; $prfres = mysql_query( $prfsql ); $prfrow = mysql_fetch_array( $prfres ); if(empty($prfrow["id"])){ header("Location:/girls/"); } /////////////////////////////////////////▼初期処理▼ //http://から始まるURLを指定 $docomo = "http://mobile.cityheaven.net/tt/cocomero/B6GirlDetail/?girlId=" . $prfrow["heaven"]."/?of=y"; //ドコモの場合 $au = "http://mobile.cityheaven.net/tt/cocomero/B6GirlDetail/?girlId=" . $prfrow["heaven"]."/?of=y"; //auの場合 $softbank = "http://mobile.cityheaven.net/ttcocomero/B6GirlDetail/?girlId=" . $prfrow["heaven"]."/?of=y"; //ソフトバンクの場合 $iphone = "https://smart.cityheaven.net/tokyo/A1304/A130401/cocomero/girlid-" . $prfrow["heaven"]."/?of=y"; //iphoneの場合 $xperia = "https://smart.cityheaven.net/tokyo/A1304/A130401/cocomero/girlid-" . $prfrow["heaven"]."/?of=y"; //xperiaの場合 /////////////////////////////////////////▲初期処理終端▲ /////////////////////////////////////////▼携帯判別▼ $user_agent = $_SERVER['HTTP_USER_AGENT']; if(strstr($user_agent,"DoCoMo") !== false){ header("Location: $docomo"); }elseif(strstr($user_agent,"UP\.Browser") !== false){ header("Location: $au"); }elseif(strstr($user_agent,"J-PHONE") !== false){ header("Location: $softbank"); }elseif(strstr($user_agent,"Vodafone") !== false){ header("Location: $softbank"); }elseif(strstr($user_agent,"SoftBank") !== false){ header("Location: $softbank"); }elseif(strstr($user_agent,"J-EMULATOR") !== false){ header("Location: $softbank"); }elseif(strstr($user_agent,"iPhone") !== false or strstr($user_agent,"iPad") !== false){ header("Location: $iphone"); }elseif(strstr($user_agent,"Android") !== false){ header("Location: $xperia"); }elseif(strstr($user_agent,"Windows Phone") !== false){ header("Location: $xperia"); } ?>