$res = check_agent();
print_r($res);
/*
제작자이름 : navyism
제작자메일 : navyism@chol.com
관련사이트 : http://navyism.com
*/
function check_agent()
{
global $HTTP_SERVER_VARS;
/*-----------------------------------------------------------------
OS Pattern
'keyword' => 'name',
-----------------------------------------------------------------*/
$OS = array(
/* PC */
array('Windows CE', 'Windows CE'),
array('Win98', 'Windows 98'),
array('Windows 9x', 'Windows ME'),
array('Windows me', 'Windows ME'),
array('Windows 98', 'Windows 98'),
array('Windows 95', 'Windows 95'),
array('Windows NT 6', 'Windows Vista'),
array('Windows NT 5.2', 'Windows 2003/XP x64'),
array('Windows NT 5.01', 'Windows 2000 SP1'),
array('Windows NT 5.1', 'Windows XP'),
array('Windows NT 5', 'Windows 2000'),
array('Windows NT', 'Windows NT'),
array('Macintosh', 'Macintosh'),
array('Mac_PowerPC', 'Mac PowerPC'),
array('Unix', 'Unix'),
array('bsd', 'BSD'),
array('Linux', 'Linux'),
array('Wget', 'Linux'),
array('windows', 'ETC Windows'),
array('mac', 'ETC Mac'),
/* MOBILE */
array('PSP', 'PlayStation Portable'),
array('Symbian', 'Symbian PDA'),
array('Nokia', 'Nokia PDA'),
array('LGT', 'LG Mobile'),
array('mobile', 'ETC Mobile'),
/* WEB ROBOT */
array('Googlebot', 'GoogleBot'),
array('OmniExplorer', 'OmniExplorerBot'),
array('MJ12bot', 'majestic12Bot'),
array('ia_archiver', 'Alexa(IA Archiver)'),
array('Yandex', 'Yandex bot'),
array('Inktomi', 'Inktomi Slurp'),
array('Giga', 'GigaBot'),
array('Jeeves', 'Jeeves bot'),
array('Planetwide', 'IBM Planetwide bot'),
array('bot', 'ETC Robot'),
array('Crawler', 'ETC Robot'),
array('library', 'ETC Robot'),
);
/*-----------------------------------------------------------------
Browser Pattern
'keyword' => 'name',
-----------------------------------------------------------------*/
$BW = array(
/* BROWSER */
array('MSIE 2', 'InternetExplorer 2'),
array('MSIE 3', 'InternetExplorer 3'),
array('MSIE 4', 'InternetExplorer 4'),
array('MSIE 5', 'InternetExplorer 5'),
array('MSIE 6', 'InternetExplorer 6'),
array('MSIE 7', 'InternetExplorer 7'),
array('MSIE', 'ETC InternetExplorer'),
array('Firefox', 'FireFox'),
array('Safari', 'Safari'),
array('Opera', 'Opera'),
array('Lynx', 'Lynx'),
array('LibWWW', 'LibWWW'),
array('Konqueror', 'Konqueror'),
array('Internet Ninja', 'Internet Ninja'),
array('Download Ninja', 'Download Ninja'),
array('WebCapture', 'WebCapture'),
array('LTH', 'LTH Browser'),
array('Gecko', 'Gecko compatible'),
array('Mozilla', 'Mozilla compatible'),
array('wget', 'Wget command'),
/* MOBILE */
array('PSP', 'PlayStation Portable'),
array('Symbian', 'Symbian PDA'),
array('Nokia', 'Nokia PDA'),
array('LGT', 'LG Mobile'),
array('mobile', 'ETC Mobile'),
/* WEB ROBOT */
array('Googlebot', 'GoogleBot'),
array('OmniExplorer', 'OmniExplorerBot'),
array('MJ12bot', 'majestic12Bot'),
array('ia_archiver', 'Alexa(IA Archiver)'),
array('Yandex', 'Yandex bot'),
array('Inktomi', 'Inktomi Slurp'),
array('Giga', 'GigaBot'),
array('Jeeves', 'Jeeves bot'),
array('Planetwide', 'IBM Planetwide bot'),
array('bot', 'ETC Robot'),
array('Crawler', 'ETC Robot'),
);
foreach($OS as $val)
{
if(eregi($val[0], $_SERVER['HTTP_USER_AGENT']))
{
$os_name = $val[1];
break;
}
}
foreach($BW as $val)
{
if(eregi($val[0], $_SERVER['HTTP_USER_AGENT']))
{
$br_name = $val[1];
break;
}
}
$res = array(
'os' => $os_name,
'br' => $br_name
);
return $res;
}
비슷한글 : http://haco.tistory.com/1414
print_r($res);
/*
제작자이름 : navyism
제작자메일 : navyism@chol.com
관련사이트 : http://navyism.com
*/
function check_agent()
{
global $HTTP_SERVER_VARS;
/*-----------------------------------------------------------------
OS Pattern
'keyword' => 'name',
-----------------------------------------------------------------*/
$OS = array(
/* PC */
array('Windows CE', 'Windows CE'),
array('Win98', 'Windows 98'),
array('Windows 9x', 'Windows ME'),
array('Windows me', 'Windows ME'),
array('Windows 98', 'Windows 98'),
array('Windows 95', 'Windows 95'),
array('Windows NT 6', 'Windows Vista'),
array('Windows NT 5.2', 'Windows 2003/XP x64'),
array('Windows NT 5.01', 'Windows 2000 SP1'),
array('Windows NT 5.1', 'Windows XP'),
array('Windows NT 5', 'Windows 2000'),
array('Windows NT', 'Windows NT'),
array('Macintosh', 'Macintosh'),
array('Mac_PowerPC', 'Mac PowerPC'),
array('Unix', 'Unix'),
array('bsd', 'BSD'),
array('Linux', 'Linux'),
array('Wget', 'Linux'),
array('windows', 'ETC Windows'),
array('mac', 'ETC Mac'),
/* MOBILE */
array('PSP', 'PlayStation Portable'),
array('Symbian', 'Symbian PDA'),
array('Nokia', 'Nokia PDA'),
array('LGT', 'LG Mobile'),
array('mobile', 'ETC Mobile'),
/* WEB ROBOT */
array('Googlebot', 'GoogleBot'),
array('OmniExplorer', 'OmniExplorerBot'),
array('MJ12bot', 'majestic12Bot'),
array('ia_archiver', 'Alexa(IA Archiver)'),
array('Yandex', 'Yandex bot'),
array('Inktomi', 'Inktomi Slurp'),
array('Giga', 'GigaBot'),
array('Jeeves', 'Jeeves bot'),
array('Planetwide', 'IBM Planetwide bot'),
array('bot', 'ETC Robot'),
array('Crawler', 'ETC Robot'),
array('library', 'ETC Robot'),
);
/*-----------------------------------------------------------------
Browser Pattern
'keyword' => 'name',
-----------------------------------------------------------------*/
$BW = array(
/* BROWSER */
array('MSIE 2', 'InternetExplorer 2'),
array('MSIE 3', 'InternetExplorer 3'),
array('MSIE 4', 'InternetExplorer 4'),
array('MSIE 5', 'InternetExplorer 5'),
array('MSIE 6', 'InternetExplorer 6'),
array('MSIE 7', 'InternetExplorer 7'),
array('MSIE', 'ETC InternetExplorer'),
array('Firefox', 'FireFox'),
array('Safari', 'Safari'),
array('Opera', 'Opera'),
array('Lynx', 'Lynx'),
array('LibWWW', 'LibWWW'),
array('Konqueror', 'Konqueror'),
array('Internet Ninja', 'Internet Ninja'),
array('Download Ninja', 'Download Ninja'),
array('WebCapture', 'WebCapture'),
array('LTH', 'LTH Browser'),
array('Gecko', 'Gecko compatible'),
array('Mozilla', 'Mozilla compatible'),
array('wget', 'Wget command'),
/* MOBILE */
array('PSP', 'PlayStation Portable'),
array('Symbian', 'Symbian PDA'),
array('Nokia', 'Nokia PDA'),
array('LGT', 'LG Mobile'),
array('mobile', 'ETC Mobile'),
/* WEB ROBOT */
array('Googlebot', 'GoogleBot'),
array('OmniExplorer', 'OmniExplorerBot'),
array('MJ12bot', 'majestic12Bot'),
array('ia_archiver', 'Alexa(IA Archiver)'),
array('Yandex', 'Yandex bot'),
array('Inktomi', 'Inktomi Slurp'),
array('Giga', 'GigaBot'),
array('Jeeves', 'Jeeves bot'),
array('Planetwide', 'IBM Planetwide bot'),
array('bot', 'ETC Robot'),
array('Crawler', 'ETC Robot'),
);
foreach($OS as $val)
{
if(eregi($val[0], $_SERVER['HTTP_USER_AGENT']))
{
$os_name = $val[1];
break;
}
}
foreach($BW as $val)
{
if(eregi($val[0], $_SERVER['HTTP_USER_AGENT']))
{
$br_name = $val[1];
break;
}
}
$res = array(
'os' => $os_name,
'br' => $br_name
);
return $res;
}
비슷한글 : http://haco.tistory.com/1414
반응형
'인터넷정보' 카테고리의 다른 글
Windows XP 블루스크린 오류목록 총정리 (0) | 2007.11.20 |
---|---|
브라우저 오류표시 - 종류와 의미 (0) | 2007.11.20 |
브라우저 오류표시 - 종류와 의미 (0) | 2007.11.20 |
예쁜 스위시 소스모음 (0) | 2007.11.20 |
예쁜 스위시 소스모음 (0) | 2007.11.20 |
check_agent - 사용자의 os및 브라우저이름 확인 (0) | 2007.11.20 |
1970년 이전 날짜 사용가능한 date, mktime (0) | 2007.11.19 |
1970년 이전 날짜 사용가능한 date, mktime (0) | 2007.11.19 |
ASP DateAdd 함수를 이용한 방법 :: 날짜 함수, 계산하기 (0) | 2007.11.19 |
ASP DateAdd 함수를 이용한 방법 :: 날짜 함수, 계산하기 (0) | 2007.11.19 |