그누보드 모바일홈페이지에서 PC버전으로 가면.. 다시 모바일버전으로 가요... 정보
그누보드 모바일홈페이지에서 PC버전으로 가면.. 다시 모바일버전으로 가요...본문
index.php 에 넣었구요
<?
$mobile_list_arr=array('/iphone/i','/ipod/i','/ipod/i','/blackberry/i','/android/i','/windows ce/i','/lg/i','/mot/i','/samsung/i','/sonyericsson/i');
function mobile_device_detect(){
global $mobile_list_arr;
$user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
for($i=0;$i<count($mobile_list_arr);$i++){
if(preg_match($mobile_list_arr[$i],$user_agent)){
$device_isMobile= true;
}
}
return $device_isMobile;
}
$Qs=$_SERVER["QUERY_STRING"];
if(mobile_device_detect()){
//모바일페이지
$Us="new-itloan.co.kr/m";
$Ds=(strpos($Us,"?"))?"&":"?";
$Qs=(strlen($Qs)>0)? $Ds.$Qs:"";
$Us=$Us.$Qs;
header("Location: ".$Us);
exit;
}
?>
쿠키를 넣고 해야 한다는데 잘 모르겠어요... ㅠ.ㅠ 고수님좀 헬프요!!
<?
$mobile_list_arr=array('/iphone/i','/ipod/i','/ipod/i','/blackberry/i','/android/i','/windows ce/i','/lg/i','/mot/i','/samsung/i','/sonyericsson/i');
function mobile_device_detect(){
global $mobile_list_arr;
$user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
for($i=0;$i<count($mobile_list_arr);$i++){
if(preg_match($mobile_list_arr[$i],$user_agent)){
$device_isMobile= true;
}
}
return $device_isMobile;
}
$Qs=$_SERVER["QUERY_STRING"];
if(mobile_device_detect()){
//모바일페이지
$Us="new-itloan.co.kr/m";
$Ds=(strpos($Us,"?"))?"&":"?";
$Qs=(strlen($Qs)>0)? $Ds.$Qs:"";
$Us=$Us.$Qs;
header("Location: ".$Us);
exit;
}
?>
쿠키를 넣고 해야 한다는데 잘 모르겠어요... ㅠ.ㅠ 고수님좀 헬프요!!
댓글 전체

<html>
<head>
<script type="text/javascript">
var mobile_keys = new Array('iPhone','iPod','Android','BlackBerry','Windows Phone','Windows CE','LG','MOT','SAMSUNG','SonyEricsson','Nokia');
if(document.URL.match('move_pc_screen')) mobile_keys = null; // URL 파라메타에 'move_pc_screen' 가 포함되어 있을땐 적용안함
for(i in mobile_keys){
if(navigator.userAgent.match(mobile_keys[i]) != null){
location.href = "http://모바일 디렉토리 주소"; // 모바일 홈 연결 주소
break;
}
}
</script>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<frameset cols="100%" border="0" framespacing="0">
<frameset rows="*,0">
<FRAME noResize="noresize" SCROLLING="auto" SRC="홈주소" name="main" marginwidth="0" marginheight="0" "main">
<frame name="main1" src="blank.html" target="_top" marginwidth="0" marginheight="0" scrolling="no" noresize="noresize" style="text-align: center; word-spacing: 0; margin: 0">
</frameset>
index.html 만드세요
<head>
<script type="text/javascript">
var mobile_keys = new Array('iPhone','iPod','Android','BlackBerry','Windows Phone','Windows CE','LG','MOT','SAMSUNG','SonyEricsson','Nokia');
if(document.URL.match('move_pc_screen')) mobile_keys = null; // URL 파라메타에 'move_pc_screen' 가 포함되어 있을땐 적용안함
for(i in mobile_keys){
if(navigator.userAgent.match(mobile_keys[i]) != null){
location.href = "http://모바일 디렉토리 주소"; // 모바일 홈 연결 주소
break;
}
}
</script>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<frameset cols="100%" border="0" framespacing="0">
<frameset rows="*,0">
<FRAME noResize="noresize" SCROLLING="auto" SRC="홈주소" name="main" marginwidth="0" marginheight="0" "main">
<frame name="main1" src="blank.html" target="_top" marginwidth="0" marginheight="0" scrolling="no" noresize="noresize" style="text-align: center; word-spacing: 0; margin: 0">
</frameset>
index.html 만드세요
감사합니다~