방문자 라이브러리 모든 OS , 브라우저 표시
visit.lib.php
<?
if (!defined('_GNUBOARD_')) exit;
// 방문자수 출력
function visit($skin_dir="basic")
{
global $config, $g4;
// visit 배열변수에
// $visit[1] = 오늘
// $visit[2] = 어제
// $visit[3] = 최대
// $visit[4] = 전체
// 숫자가 들어감
preg_match("/오늘:(.*),어제:(.*),최대:(.*),전체:(.*)/", $config['cf_visit'], $visit);
ob_start();
$visit_skin_path = "$g4[path]/skin/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("/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 4.[0-9]*/", $agent)) { $s = "MSIE 4.x"; }
else if(preg_match("/firefox/", $agent)) { $s = "FireFox"; }
else if(preg_match("/x11/", $agent)) { $s = "Netscape"; }
else if(preg_match("/opera/", $agent)) { $s = "Opera"; }
else if(preg_match("/gec/", $agent)) { $s = "Gecko"; }
else if(preg_match("/bot|slurp/", $agent)) { $s = "Robot"; }
else { $s = "기타"; }
return $s;
}
function get_os($agent)
{
$agent = strtolower($agent);
//echo $agent; echo "<br/>";
if (preg_match("/windows 98/", $agent)) { $s = "98"; }
else if (preg_match("/windows 95/", $agent)) { $s = "95"; }
else if(preg_match("/windows nt 4\.[0-9]*/", $agent)) { $s = "NT"; }
else if(preg_match("/windows nt 5\.0/", $agent)) { $s = "2000"; }
else if(preg_match("/windows nt 5\.1/", $agent)) { $s = "XP"; }
else if(preg_match("/windows nt 5\.2/", $agent)) { $s = "2003"; }
else if(preg_match("/windows nt 6\.0/", $agent)) { $s = "Vista"; }
else if(preg_match("/chrome/", $agent)) { $s = "Chrome"; }
else if(preg_match("/windows 9x/", $agent)) { $s = "ME"; }
else if(preg_match("/windows ce/", $agent)) { $s = "CE"; }
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 { $s = "기타"; }
return $s;
}
?>
댓글 6개
else if(preg_match("/chrome/", $agent)) { $s = "Chrome"; }
else if(preg_match("/safari/", $agent)) { $s = "Safari"; }
else if(preg_match("/chrome/", $agent)) { $s = "Chrome"; }
else if(preg_match("/windows 9x/", $agent)) { $s = "ME"; }
하단 여기서 크롬은 빼셔도^^
else if(preg_match("/windows nt 6\.1/", $agent)) { $s = "Windows7"; } //추가
리눅스입니다 ㅎ
게시판 목록
그누4 팁자료실
나누면 즐거움이 커집니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3309 | 3년 전 | 1798 | ||
| 3308 | 11년 전 | 2087 | ||
| 3307 |
uPAmJ903
|
6년 전 | 4742 | |
| 3306 |
바른사나이
|
6년 전 | 3269 | |
| 3305 | 6년 전 | 12297 | ||
| 3304 | 7년 전 | 3699 | ||
| 3303 | 7년 전 | 3737 | ||
| 3302 |
지리산초보
|
7년 전 | 13589 | |
| 3301 |
sozet
|
8년 전 | 4897 | |
| 3300 |
sozet
|
8년 전 | 5963 | |
| 3299 |
sozet
|
8년 전 | 10856 | |
| 3298 | 8년 전 | 4008 | ||
| 3297 |
또치하우스
|
8년 전 | 4434 | |
| 3296 | 8년 전 | 11961 | ||
| 3295 |
또치하우스
|
8년 전 | 14978 | |
| 3294 | 8년 전 | 6016 | ||
| 3293 | 8년 전 | 5583 | ||
| 3292 |
|
9년 전 | 5309 | |
| 3291 | 9년 전 | 13673 | ||
| 3290 | 9년 전 | 5043 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기