접속자 현황 업데이트 > 그누보드5 팁자료실

그누보드5 팁자료실

접속자 현황 업데이트 정보

접속자 현황 업데이트

첨부파일

Untitled-1.jpg (52.1K) 17회 다운로드 2013-11-13 14:32:13

본문

OS 별, 브라우져 별 업데이트 내용입니다.
크로스 브라우징을 위해 MSIE 6 을 좆다가 보니 호환성 모드를 고려해야 할 때가 있더군요.
방문객의 상태가 어떠냐에 따라 구 버젼의 브라우져에 대응 할 수 있겠죠..
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
과 같이 호환모드를 강제하기 위해서 실제 얼마나 많은 접속자가 오는지 확인해 볼 필요가 있습니다.
내친김에 윈도우 8, 8.1 의 구분도 추가하면 좋을 듯 합니다.

user.agent 값에 msie 6 이어도 실제 브라우져는 7 또는 8 일 수 있습니다. (호환모드)
이를 확인하는 값은 triednt 값입니다.


참고 : http://msdn.microsoft.com/library/ms537503.aspx

Trident 값은 MSIE 8 부터 나옵니다

수정할 내용은 다음과 같습니다.


lib/visit.lib.php

function get_brow($agent)
~~~~~~
else if(preg_match("/msie 6.0[0-9]*/", $agent))    {
if(preg_match("/trident\/4*/", $agent))    {
$s = "MSIE 6 8호환";
} else if(preg_match("/trident\/5*/", $agent))    {
$s = "MSIE 6 9호환";
} else if(preg_match("/trident\/6*/", $agent))    {
$s = "MSIE 6 10호환";
} else if(preg_match("/trident\/7*/", $agent))    {
$s = "MSIE 6 11호환";
} else {
$s = "MSIE 6";
}
}
    else if(preg_match("/msie 7.0[0-9]*/", $agent))    {
if(preg_match("/trident\/4*/", $agent))    {
$s = "MSIE 7 8호환";
} else if(preg_match("/trident\/5*/", $agent))    {
$s = "MSIE 7 9호환";
} else if(preg_match("/trident\/6*/", $agent))    {
$s = "MSIE 7 10호환";
} else if(preg_match("/trident\/7*/", $agent))    {
$s = "MSIE 7 11호환";
} else {
$s = "MSIE 7";
}
}
    else if(preg_match("/msie 8.0[0-9]*/", $agent))    { $s = "MSIE 8.0"; }
else if(preg_match("/msie 9.0[0-9]*/", $agent))    { $s = "MSIE 9"; }
else if(preg_match("/msie 10.0[0-9]*/", $agent))    { $s = "MSIE 10"; }
else if(preg_match("/msie 11.0[0-9]*/", $agent))    { $s = "MSIE 11"; }
~~~~~~


function get_os($agent)
~~~~
else if(preg_match("/windows nt 6\.1/", $agent))        { $s = "Windows7"; }
else if(preg_match("/windows nt 6\.2/", $agent))        { $s = "Windows 8"; }
else if(preg_match("/windows nt 6\.3/", $agent))        { $s = "Windows 8.1"; }
    else if(preg_match("/windows 9x/", $agent))            { $s = "ME"; }

~~~~


관리자님 업데이트 부탁요~~


=======================
추가.. ie 6 (7도...)을 MS가 버렸음에도 아직 10% 가까이 나타납니다.
무시할 수 만은 없는 수치네요...
추천
3

댓글 5개

전체 2,431 |RSS
그누보드5 팁자료실 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT