评估HTTP_USER_AGENT
时间:2007-02-17 来源:PHP爱好者
<?
print"<html>";
print"<body>";
ereg("^([A-Za-z]+)/([0-9]+.[0-9]+)(.*)$",$HTTP_USER_AGENT,$match);
$user_name=$match[1];
$user_version=$match[2];
$user_description=$match[3];
if(eregi("msie",$user_description))
{
ereg("((.*);(.*)(.*);(.*))$",$user_description,$match);
$user_name=$match[2];
$user_version=$match[3];
}
print"你使用的是 $user_name";
print $user_version."!<br>";
print"</body></html>"
?>
php爱好者站 http://www.phpfans.net c/vc/c++/java.
print"<html>";
print"<body>";
ereg("^([A-Za-z]+)/([0-9]+.[0-9]+)(.*)$",$HTTP_USER_AGENT,$match);
$user_name=$match[1];
$user_version=$match[2];
$user_description=$match[3];
if(eregi("msie",$user_description))
{
ereg("((.*);(.*)(.*);(.*))$",$user_description,$match);
$user_name=$match[2];
$user_version=$match[3];
}
print"你使用的是 $user_name";
print $user_version."!<br>";
print"</body></html>"
?>
php爱好者站 http://www.phpfans.net c/vc/c++/java.
相关阅读 更多 +