g4에서 모바일일때 특정 웹사이트로
본문
이동 어떻게하나요?
답변 1
전에 남기신 글에 답변 달아드렸어요
<?
$mobile_agent = array("Iphone","Ipod","Android","Blackberry","SymbianOS|SCH-M\d+","Opera Mini", "Windows ce", "Nokia", "sony" );
$check_mobile = false;
for($i=0; $i<sizeof($mobile_agent); $i++){
if(stripos( $_SERVER['HTTP_USER_AGENT'], $mobile_agent[$i] )){
$check_mobile = true;
break;
}
}
if($check_mobile) { ?>
<script>
location.href = "http://sir.co.kr/"; </script>
<?
} ?>
답변을 작성하시기 전에 로그인 해주세요.