Andy's Blog » useragent正则获取信息, user agent可以获取哪些信息 » UserAgent可以得到的信息

UserAgent可以得到的信息

今天好不容易才搞出来,通过$_SERVER['HTTP_USER_AGENT']和一些正则,得到以下结果

这是我的IE6

Array
(
[agent] => Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
[browser] => explorer
[browser_note] => 6.0
[os] => windowsxp
)

这是我的Firefox

Array
(
[agent] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
[browser] => firefox
[browser_note] => 2.0.0.11
[os] => windowsxp
[bonus_0] => encU
[bonus_1] => lang
[bonus_note_1] => en
)

这是我的Opera

Array
(
[agent] => Opera/9.10 (Windows NT 5.1; U; zh-cn)
[browser] => opera
[browser_note] => 9.10
[os] => windowsxp
[bonus_0] => encU
[bonus_1] => lang
[bonus_note_1] => zh
)

Incoming search terms:

Tags: http, UserAgent

本文地址: http://www.21andy.com/new/20071218/724.html