function getSystem(){
$sys = $_SERVER['HTTP_USER_AGENT'];

 

if(stripos($sys, "NT 6.1"))
$os = "Windows 7";
elseif(stripos($sys, "NT 6.0"))
$os = "Windows Vista";
elseif(stripos($sys, "NT 5.1"))
$os = "Windows XP";
elseif(stripos($sys, "NT 5.2"))
$os = "Windows Server 2003";
elseif(stripos($sys, "NT 5"))
$os = "Windows 2000";
elseif(stripos($sys, "NT 4.9"))
$os = "Windows ME";
elseif(stripos($sys, "NT 4"))
$os = "Windows NT 4.0";
elseif(stripos($sys, "98"))
$os = "Windows 98";
elseif(stripos($sys, "95"))
$os = "Windows 95";
elseif(stripos($sys, "Mac"))
$os = "Mac";
 
elseif(stripos($sys, "Unix"))
$os = "Unix";
elseif(stripos($sys, "FreeBSD"))
$os = "FreeBSD";
elseif(stripos($sys, "SunOS"))
$os = "SunOS";
elseif(stripos($sys, "BeOS"))
$os = "BeOS";
elseif(stripos($sys, "OS/2"))
$os = "OS/2";
elseif(stripos($sys, "PC"))
$os = "Macintosh";
elseif(stripos($sys, "AIX"))
$os = "AIX";
else
$os = "未知作業系統";
return $os;
}

 

創作者介紹
創作者 shadow 的頭像
shadow

資訊園

shadow 發表在 痞客邦 留言(1) 人氣()