브라우저와 OS 종류를 추가해 봅니다.
        
	            2015.07.20 09:11
	            2,349
	            11
		        
	        
        - 
                - 첨부파일 : visit.lib.php (11.1K) - 다운로드
 
- - 짧은주소 : http://e3net.fineyes.com/bbs/?t=ye
 
본문
첨부한 파일을 LIB 폴더에 있는 파일과 교체해 주시면 됩니다.
백업은 필수요.
소스는 아래와 같습니다.
<?php
if (!defined('_GNUBOARD_')) exit;
// 방문자수 출력
function visit($skin_dir='basic')
{
    global $config, $g5;
    // visit 배열변수에
    // $visit[1] = 오늘
    // $visit[2] = 어제
    // $visit[3] = 최대
    // $visit[4] = 전체
    // 숫자가 들어감
    preg_match("/오늘:(.*),어제:(.*),최대:(.*),전체:(.*)/", $config['cf_visit'], $visit);
    settype($visit[1], "integer");
    settype($visit[2], "integer");
    settype($visit[3], "integer");
    settype($visit[4], "integer");
    ob_start();
    if(G5_IS_MOBILE) {
        $visit_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/visit/'.$skin_dir;
        $visit_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/visit/'.$skin_dir;
    } else {
        $visit_skin_path = G5_SKIN_PATH.'/visit/'.$skin_dir;
        $visit_skin_url = G5_SKIN_URL.'/visit/'.$skin_dir;
    }
    include_once ($visit_skin_path.'/visit.skin.php');
    $content = ob_get_contents();
    ob_end_clean();
    return $content;
}
// get_browser() 함수는 이미 있음
function get_brow($agent)
{
    $agent = strtolower($agent);
    //echo $agent; echo "<br/>";
    if (preg_match("/msie 5.0[0-9]*/", $agent))        { $s = "MSIE 5.0"; }
    else if(preg_match("/inapp/", $agent))              { $s = "NAVER Apps"; } //네이버어플
    else if(preg_match("/navercafe/", $agent))          { $s = "NAVER CAFE Apps"; } //네이버 카페어플
    else if(preg_match("/daumapps/", $agent))          { $s = "DAUM Apps"; } //다음어플
    else if(preg_match("/natebrowser/", $agent))        { $s = "NATE Apps"; } //네이트어플
    else if(preg_match("/9b176/", $agent))              { $s = "Google Apps"; } //구글어플
//브라우저 어플 끝
    else if(preg_match("/maxthon/", $agent))            { $s = "Maxthon"; } //Maxthon
    else if(preg_match("/apple-pubsub/", $agent))      { $s = "Apple-PubSub"; } //Safari Feed Reader
    else if(preg_match("/mqqbrowser/", $agent))        { $s = "MQQBrowser"; } //MQQBrowser
    else if(preg_match("/diigobrowser/", $agent))      { $s = "DiigoBrowser"; } //DiigoBrowser
    else if(preg_match("/avant browser/", $agent))      { $s = "Avant Browser"; } //Avant Browser
    else if(preg_match("/embedded/", $agent))          { $s = "Embedded Web Browser"; } //Embedded Web Browser
    else if(preg_match("/browserng/", $agent))          { $s = "BrowserNG"; } //BrowserNG
    else if(preg_match("/smarthub|smart-tv|smarttv/", $agent))        { $s = "Smart TV"; } //Smart TV
    else if(preg_match("/flipboardproxy/", $agent))    { $s = "FlipboardProxy"; } //FlipboardProxy
    else if(preg_match("/wosbrowser/", $agent))        { $s = "wOSBrowser"; } //wOSBrowser
//기타 브라우저 끝
    else if(preg_match("/google/", $agent))            { $s = "Google Robot"; } //구글로봇
    else if(preg_match("/mediapartners/", $agent))      { $s = "Google AdSense"; } //구글애드센스
    else if(preg_match("/-mobile/", $agent))            { $s = "Google-Mobile Robot"; } //구글모바일로봇
    else if(preg_match("/naver blog/", $agent))        { $s = "NAVER Blog Rssbot"; } //네이버블로그로봇
    else if(preg_match("/naver|yeti/", $agent))        { $s = "NAVER Robot"; } //네이버로봇
    else if(preg_match("/daum/", $agent))              { $s = "DAUM Robot"; } //다음로봇
    else if(preg_match("/yahoo/", $agent))              { $s = "Yahoo! Robot"; } //야후!로봇
    else if(preg_match("/empas|nate/", $agent))        { $s = "NATE Robot"; } //네이트로봇
    else if(preg_match("/bing/", $agent))              { $s = "Bing Robot"; } //Bing로봇
    else if(preg_match("/msn/", $agent))                { $s = "MSN Robot"; } //MSN로봇
    else if(preg_match("/zum/", $agent))                { $s = "Zum Robot"; } //Zum로봇
    else if(preg_match("/qrobot/", $agent))            { $s = "Qrobot"; } //Qrobot로봇
    else if(preg_match("/archive|ia_archiver/", $agent)){ $s = "Archive Robot"; } //아카이브로봇
    else if(preg_match("/twitter/", $agent))            { $s = "Twitter Robot"; } //Twitter로봇
    else if(preg_match("/facebook/", $agent))          { $s = "Facebook Robot"; } //Facebook로봇
    else if(preg_match("/whois/", $agent))              { $s = "Whois Search Robot"; } //Whois Search로봇
    else if(preg_match("/checkprivacy/", $agent))      { $s = "KISA"; } //한국인터넷진흥원
    //robots.txt로 차단 안되는 로봇
    else if(preg_match("/mj12/", $agent))              { $s = "MJ12bot"; } //MJ12bot
    else if(preg_match("/baidu/", $agent))              { $s = "Baiduspider"; } //Baiduspider
    else if(preg_match("/yandex/", $agent))            { $s = "YandexBot"; } //YandexBot로봇
    else if(preg_match("/Sogou/", $agent))              { $s = "Sogou web spider"; } //Sogou로봇
    else if(preg_match("/tweetedtimes/", $agent))      { $s = "TweetedTimes Bot"; } //TweetedTimes Bot
    else if(preg_match("/discobot/", $agent))          { $s = "Discoveryengine Robot"; } //Discoveryengine로봇
    else if(preg_match("/twiceler/", $agent))          { $s = "Twiceler Robot"; } //Twiceler로봇
    else if(preg_match("/ezooms/", $agent))            { $s = "Ezooms Robot"; } //Ezooms로봇
    else if(preg_match("/wbsearch/", $agent))          { $s = "WBSearchBot"; } //WBSearchBot
    else if(preg_match("/proximic/", $agent))          { $s = "proximic"; } //proximic로봇
    else if(preg_match("/GTWek/", $agent))              { $s = "GTWek"; } //GTWek로봇
    else if(preg_match("/java|python|axel|dalvik|greatnews|hmschnl|huawei|jakarta|netcraft|parrotsite|readability|unwind|pagepeeker|shunix|crystalsemantics|turnitin|komodia|siteIntel|apercite|butterfly/", $agent))          { $s = "Unknown Robot"; } //Unknown로봇
    else if(preg_match("/cron/", $agent))              { $s = "WebCron"; } //WebCron
    else if(preg_match("/capture/", $agent))            { $s = "WebCapture"; } //WebCapture로봇
    else if(preg_match("/w3c/", $agent))                { $s = "W3C Validator"; } //W3C Validator
    else if(preg_match("/wget/", $agent))              { $s = "Wget Validator"; } //Wget
    else if(preg_match("/hanrss/", $agent))            { $s = "HanRSS"; } //HanRSS
    else if(preg_match("/fetcher/", $agent))            { $s = "Feed Fetcher"; } //Feed Fetcher
    else if(preg_match("/feed|reader|rss|greatnews/", $agent))                  { $s = "Feed Reader"; } //Feed Reader
    else if(preg_match("/bot|slurp|scrap|spider|crawl|curl/", $agent))          { $s = "Robot"; }
    else if(preg_match("/msie 5.5[0-9]*/", $agent))    { $s = "MSIE 5.5"; }
    else if(preg_match("/msie 6.0[0-9]*/", $agent))    { $s = "MSIE 6.0"; }
    else if(preg_match("/msie 7.0[0-9]*/", $agent))    { $s = "MSIE 7.0"; }
    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.0"; }
    else if(preg_match("/msie 10.0[0-9]*/", $agent))    { $s = "MSIE 10.0"; }
    else if(preg_match("/msie 4.[0-9]*/", $agent))      { $s = "MSIE 4.x"; }
    else if(preg_match("/firefox/", $agent))            { $s = "FireFox"; }
    else if(preg_match("/chrome/", $agent))            { $s = "Chrome"; }
    else if(preg_match("/x11/", $agent))                { $s = "Netscape"; }
    else if(preg_match("/opera/", $agent))              { $s = "Opera"; }
    else if(preg_match("/safari/", $agent))            { $s = "Safari"; }
    else if(preg_match("/netFront/", $agent))          { $s = "NetFront"; }
    else if(preg_match("/gec/", $agent))                { $s = "Gecko"; }
    else if(preg_match("/internet explorer/", $agent))  { $s = "IE"; }
    else if(preg_match("/mozilla/", $agent))            { $s = "Mozilla"; }
    else { $s = "기타"; }
    return $s;
}
 
function get_os($agent)
{
    $agent = strtolower($agent);
    //echo $agent; echo "<br/>";
    //추가사항
    if(preg_match("/iphone/", $agent))                      { $s = "iPhone"; } //iPhone
    else if(preg_match("/ipad/", $agent))                   { $s = "iPad"; } //iPad
    else if(preg_match("/ipod/", $agent))                   { $s = "iPod"; } //iPod
    else if(preg_match("/android/", $agent))                { $s = "Android"; } //Android
    else if(preg_match("/psp/", $agent))                    { $s = "PSP"; } //PSP
    else if(preg_match("/playstation/", $agent))            { $s = "PLAYSTATION"; } //PLAYSTATION
    else if(preg_match("/berry/", $agent))                  { $s = "BlackBerry"; } //BlackBerry
    else if(preg_match("/symbian/", $agent))                { $s = "Symbian"; } //Symbian
    else if(preg_match("/ericsson/", $agent))               { $s = "SonyEricsson"; } //SonyEricsson
    else if(preg_match("/nokia/", $agent))                  { $s = "Nokia"; } //Nokia
    else if(preg_match("/benq/", $agent))                   { $s = "BenQ"; } //BenQ
    else if(preg_match("/mot/", $agent))                    { $s = "Motorola"; } //Motorola
    else if(preg_match("/nintendo/", $agent))               { $s = "Nintendo"; } //Nintendo
    else if(preg_match("/palm/", $agent))                   { $s = "Palm"; } //Palm
    else if(preg_match("/sch/", $agent))                    { $s = "T*옴니아"; } //T*옴니아
    else if(preg_match("/sph/", $agent))                    { $s = "애니콜"; } //삼성폰
    else if(preg_match("/sgh/", $agent))                    { $s = "옴니아"; } //옴니아
    else if(preg_match("/sch/", $agent))                    { $s = "T*옴니아"; } //T*옴니아
    else if(preg_match("/im-s/", $agent))                   { $s = "스카이폰"; } //스카이폰
    else if(preg_match("/lg/", $agent))                     { $s = "LG 사이언"; } //LG 사이언    
   
    //기본사항
    else if(preg_match("/windows 98/", $agent))             { $s = "Win98"; }
    else if(preg_match("/windows 95/", $agent))             { $s = "Win95"; }
    else if(preg_match("/windows nt 4\.[0-9]*/", $agent))   { $s = "WinNT"; }
    else if(preg_match("/windows nt 5\.0/", $agent))        { $s = "Win2000"; }
    else if(preg_match("/windows nt 5\.1/", $agent))        { $s = "WinXP"; }
    else if(preg_match("/windows nt 5\.2/", $agent))        { $s = "Win2003"; }
    else if(preg_match("/windows nt 6\.0/", $agent))        { $s = "WinVista"; }
    else if(preg_match("/windows nt 6\.1/", $agent))        { $s = "Win7"; }
    else if(preg_match("/windows nt 6\.2/", $agent))        { $s = "Win8"; }
    else if(preg_match("/windows nt 6\.3/", $agent))        { $s = "Win8.1"; }
    else if(preg_match("/windows 9x/", $agent))             { $s = "WinME"; }
    else if(preg_match("/windows ce/", $agent))             { $s = "WinCE"; }
    else if(preg_match("/mac/", $agent))                    { $s = "MAC"; }
    else if(preg_match("/linux/", $agent))                  { $s = "Linux"; }
    else if(preg_match("/sunos/", $agent))                  { $s = "sunOS"; }
    else if(preg_match("/irix/", $agent))                   { $s = "IRIX"; }
    else if(preg_match("/phone/", $agent))                  { $s = "Phone"; }
    else if(preg_match("/bot|slurp/", $agent))              { $s = "Robot"; }
    else if(preg_match("/internet explorer/", $agent))      { $s = "IE"; }
    else if(preg_match("/mozilla/", $agent))                { $s = "Mozilla"; }
    //기타
    else { $s = "기타"; }
    return $s;
}
?>
	            
	            	3
	            
	            
 로그인 후 평가 가능합니다.
        	
			
			- 
	 암스원
	
	        - 회원등급 : 지하계 / Level 4
	    
	
			포인트 6,664
		
		
			경험치 1,629
		
		
		
			[레벨 4] - 진행률
			54%
			
			    
			
		
	
		- 가입일 : 2015-06-11 01:12:56
		
		- 서명 : 배달전용 보온용기, 한통도시락		
		- 자기소개 : http://zangzip.com	
			        
댓글목록 11
메탎포스님의 댓글
- 아이디로 검색
 
	
2015.07.20 10:20^^ 오~ 어플까지 다양하게 지원해주나보네요~
축하합니다. 첫댓글 포인트 31포인트를 획득하였습니다.
shadow님의 댓글
- 아이디로 검색
 
	
2015.07.20 12:00소중한 자료 감사합니다.
					
방문자의 디바이스와 사용 브라우져를 살펴보는데 큰 도움이 될 듯 하네요.
비즈팔님의 댓글
- 아이디로 검색
 
	
2015.07.20 13:28정말 상세한 방문자 정보를 얻을 수 있겠군요.
자료 감사합니다.
소다님의 댓글
- 아이디로 검색
 
	
2015.07.21 18:35감사합니다. ^^ 덕분에 사용자 분석에 많은 도움이 되겠네요!
암스원님의 댓글
- 아이디로 검색
 
	
2015.07.22 06:59제가 편하게 쓰려고 조금 수정한 것을 나눌 뿐입니다.
크롱크롱님의 댓글
- 아이디로 검색
 
	
2015.07.23 22:39멋진소스 잘쓰겠습니다. 감사합니다.
robell님의 댓글
- 아이디로 검색
 
	
2015.09.04 05:11감사합니다
미스트님의 댓글
- 아이디로 검색
 
	
2015.09.19 13:08감사합니다. 도움이 되는 자료입니다.^^
축하합니다. 행운의 포인트 30포인트를 획득하였습니다.
퓨리프리님의 댓글
- 아이디로 검색
 
	
2016.01.06 14:18최고에요 진심..
a9a9님의 댓글
- 아이디로 검색
 
	
2017.12.03 18:55추천드림
황금초우님의 댓글
- 아이디로 검색
 
	
2017.12.05 15:29추천 한방~