mb_language("Japanese");
mb_internal_encoding("SJIS");
$UA=$_SERVER['HTTP_USER_AGENT'];
if( preg_match( "/DoCoMo/", $UA ) ){
// i-mode用のページにジャンプ
header("Location: http://i.mucchirimieppari.com");
exit();
}elseif( (preg_match( "/J-PHONE/", $UA ))or(preg_match("/Vodafone/", $UA))or(preg_match("/SoftBank/", $UA))or(preg_match("/J-EMULATOR/", $UA))){
// j-sky用のページにジャンプ
header("Location: http://i.mucchirimieppari.com");
exit();
}elseif( preg_match( "/UP\.Browser/", $UA ) ){
// Ezweb用のページにジャンプ
header("Location: http://i.mucchirimieppari.com");
exit();
//}elseif( preg_match( "/MSIE/", $UA ) ){
// header("Location: http://i.mucchirimieppari.com");
}else{
//echo $UA;
include("inc/img_counter/img_counter.php");
if($con=mysql_connect("mysql22.xserver.jp","iloveyou_muchiri","kdQJacJ3LEWx")){
mysql_query("SET NAMES sjis");
mysql_query("SET CHARACTER SET sjis",$con);
mysql_select_db("iloveyou_mucchiri5");
$sql="SELECT head , foot from head,foot ORDER BY RAND() LIMIT 0,1";
$res=mysql_query($sql);
mysql_close($con);
$row=mysql_fetch_array($res);
if($row['head']=="むっちりみえっぱり"){
$words="むっちりみえっぱり";
}else{
$words=$row['head'].$row['foot'];
}
}else{
$words = "失敗しますた
";
}
?>