$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
Posted by 알 수 없는 사용자
,
<SCRIPT LANGUAGE="javascript">
<!-- Hide from old browsers
latest = "6.2.2";

languagesq = new Object;
languagesq["un"] = "알려지지 않은 언어, ";
languagesq["cn"] = "중국 (simp.) 어, ";
languagesq["cs"] = "Czech language, ";
languagesq["da"] = "Danish language, ";
languagesq["de"] = "German language, ";
languagesq["el"] = "Greek language, ";
languagesq["en"] = "English language, ";
languagesq["es"] = "Spanish language, ";
languagesq["fc"] = "French (Canada) language, ";
languagesq["fi"] = "Finnish language, ";
languagesq["fr"] = "French language, ";
languagesq["hu"] = "Hungarian language, ";
languagesq["it"] = "Italian language, ";
languagesq["ja"] = "일본어, ";
languagesq["ko"] = "한국어, ";
languagesq["nl"] = "Dutch language, ";
languagesq["no"] = "Norwegian language, ";
languagesq["pl"] = "Polish language, ";
languagesq["pt"] = "Brazilian Portuguese language, ";
languagesq["ru"] = "Russian language, ";
languagesq["sv"] = "Swedish language, ";
languagesq["tr"] = "Turkish language, ";
languagesq["tw"] = "Chinese (trad.) language, ";
languagesq["uk"] = "영어 (UK), ";
languagesq["de-de"] = "German language, ;"
languagesq["en-gb"] = "영어 (UK), ";
languagesq["en-us"] = "영어, ";
languagesq["es-es"] = "Spanish language, ";
languagesq["fr-fr"] = "French language, ";
languagesq["ja-jp"] = "일본어, ";

lang = "un";
Component = "Unknown browser";
platform = "Unknown platform";
OS = "";
version = parseFloat(navigator.appVersion);
UA = navigator.userAgent;
ua = navigator.userAgent.toLowerCase();

// Language
if (((start = ua.indexOf("[")) > 0) &&
    ((end = ua.indexOf("]")) == (ua.indexOf("[") + 3))){
  language = ua.substring(start+1, end);
} else if (navigator.language) {
  language = navigator.language.toLowerCase();
} else if (navigator.userLanguage) {
  language = navigator.userLanguage.toLowerCase();
}
if (languagesq[language]) {
  lang = language;
}

// OS
if (((ua.indexOf("ppc") > 0) && (ua.indexOf("mac") > 0))
    || (ua.indexOf("mac_power") > 0)) {
//  if (ua.indexOf("os x")) {
//    OS = "macosx";
//  } else {
    OS = "macppc";
//  }
} else if ((ua.indexOf("linux 2.2") > 0)
           || (ua.indexOf("netscape6") && ua.indexOf("linux") > 0)) {
  OS = "linux2.2";
} else if (ua.indexOf("win") > 0) {
  OS = "win32";
}

// Other info
start = UA.indexOf('(') + 1;
end = UA.indexOf(')');
str = UA.substring(start, end);
info = str.split('; ');

if (ua.indexOf('msie') != -1) {
  platform = info[2];
  Component = navigator.appName;
  str = info[1].substring(5, info[1].length);
  version = parseFloat(str);
} else if ((start = ua.indexOf("netscape6")) > 0) {
  if (info[0].toLowerCase() == "windows") {
    platform = info[2];
  } else {
    platform = info[0] + " " + info[2];
  }
  Component = "Netscape";
  version = ua.substring(start+10, ua.length);
  if ((start = version.indexOf("b")) > 0 ) {
    pr = version.substring(start+1,version.length);
    str = version.substring(0,version.indexOf("b"));
    version = str + " Preview Release " + pr;
  }
} else {
  if(info[2]) {
    if (info[0].toLowerCase() == "windows") {
      platform = info[2];
    } else {
      platform = info[0] + " " + info[2];
    }
  } else {
    platform = info[0];
  }
  if (ua.indexOf("gecko") > 0) {
    Component = "Mozilla";
  } else if (ua.indexOf("nav") > 0) {
    Component = "Netscape Navigator";
  } else {
    Component = "Netscape Communicator";
  }
}
// Some formatting
if ((platform.indexOf("NT") != -1) && (platform.indexOf("5.1") != -1)) {
  platform = "Windows XP";
}
if ((platform.indexOf("NT") != -1) && (platform.indexOf("5.0") != -1)) {
  platform = "Windows 2000";
}
if (parseInt(version) == parseFloat(version)) {
  version = version + ".0";
}

// Message according to the sniff result


You_R_running = "<font face=\"Arial,Helvetica\" color=\"#000000\" size=\"1\">당신이 현재 사용하고 있는것은..:</font><BR>\n";
You_R_running += "<font face=\"Arial,Helvetica\" color=\"#003366\" size=\"1\"><B>" + Component + " " + version + "</B></font><BR> ";
You_R_running += "<FONT face=\"Arial,Helvetica\" SIZE=1>" + languagesq[lang] + " 운영체제 : " + platform + "</font>";

document.writeln("<TABLE CELLPADDING=8 CELLSPACING=0 BORDER=0 WIDTH=100%><TR><TD>");
document.writeln(You_R_running);

// Stop hiding from old browsers -->
</SCRIPT>
Posted by 알 수 없는 사용자
,