函數browser_infor()
{
$browser="";$browserver="";
.賽克", "aol","opera","java","macweb","webexplorer","omniweb");
$agent = $globals["http_user_agent"];
forfor($i=0; =7; $i++) //phpfensi.com
{
if (strpos($agent,$browsers[$i]))
{ $browserver =""; } } if (ereg("mozilla",$agent) && !ereg("msie",$agent))))) explode("(", $agent); $part=$temp[0]; $temp =explode("/", $part); $browserver=$temp[1]; $temp =explode(" ",$browserver); $browserver=$temp[0]; $browserver =preg_replace("/([d.]+)/","1browserver =preg_replace("/([d.]+)/","1" ); $browserver = " $browserver"; // $browser = "netscape 導航器"; } )) { $temp =explode("(", $agent); $part=$temp[1];, $part); $browserver =$temp[1];
$temp =explode(" ",$browserver);$browserver=$temp[2];
$browserver =preg_replace("/ ([d.]+)/","1",$browserver); $browserver = " $browserver";(ereg("mozilla", $agent) && ereg("msie",$agent))
//phpfensi.com
{ $part=$temp[1 ];
$temp = 爆炸(";",$part); $part=$temp[1]; //
$temp = 爆炸(" ",$part);$part); browserver=$temp[2] ;
$browserver =preg_replace("/([d.]+)/","1",$browserver);
$browserver = 「$browserver);
$browserver = browser = 「網際網路瀏覽器」;
}
if ($browser!="")
{
{ $browseinfo = 「未知」; } return $browseinfo; } //調用方法$browser=browseinfo() //調用方法$browser=browseinfo( ==取得存取者作業系統 函數osinfo() { $os=""; $agent = $globals"http_off50,005(Ft); ) && strpos($agent, '95')) { // $os="windows 95"; } ')) { $os="windows me"; } elseif (eregi('win',$agent) && ereg('98',$agent))
$os="windows 98";
$os="windows 98";
}
elseif (eregi('win',$agent) && eregi('nt 5.0',$agent)
}
elseif (eregi('win',$agent) && eregi('nt',$agent)) {
//開源
} elseif (eregi('win',$agent) && eregi('nt 5.1',$agent)) { $os="windows xp"; $os="windows xp";elseif (eregi('win',$agent) && ereg('32',$agent)) {
//開源
//開源 ="wins" } elseif (regi('linux',$agent)) { $os="linux"; } elseif (regi('unix',$agent)) { $os="unix"; //php一聚設計 } elseif (regi('sun',$agent) && regi('os',$agent)) { $os="suns"; } elseif (regi('ibm',$agent) && regi('os',$agent)) { // $os="ibm os/2"; } elseif (regi('mac',$agent) && regi('pc',$agent)) { $os="macintosh"; } elseif (regi('powerpc',$agent)) { // $os="powerpc"; } elseif (regi('aix',$agent)) { $os="aix"; } elseif (regi('hpux',$agent)) { $os="hpux"; //phpfensi.com } elseif (regi('netbsd',$agent))
elseif (regi('netbsd',$agent))
elseif (regi('netbsd',$agent)) { ; } elseif (regi('bsd',$agent)) { $os="bsd"; } elseif (ereg('osf1',$agent)) { //phpfensi.com //phpfensi.com //phpfensi.com
}
elseif (ereg('irix',$agent)) {
$os="irix";
}
elseif (regi('freebsd',$agent)) {
$os="freebsd";
//
}
if ($os=='') $os =「未知」;