Php get browser: confusing output

I have a list containing information about the user's web browser. The list was generated by PHP through a user survey. The result is as follows: (sample):

  • Mozilla / 4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident / 4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
  • Mozilla / 5.0 (Windows NT 6.0, WOW64) AppleWebKit / 535.19 (KHTML, e.g. Gecko) Chrome / 18.0.1025.152 Safari / 535.19
  • Mozilla / 5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident / 5.0)
  • Mozilla / 4.0 (compatible MSIE 8.0, Windows NT 5.1, Trident / 4.0; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727)
  • Mozilla / 5.0 (Windows NT 5.1; rv: 11.0) Gecko / 20100101 Firefox / 11.0
  • Mozilla / 5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit / 535.19 (KHTML, e.g. Gecko) Chrome / 18.0.1025.151 Safari / 535.19
  • Opera / 9.80 (Windows NT 6.0; U; da) Presto / 2.10.229 Version /11.62
  • Mozilla / 5.0 (iPad, CPU OS 5_0_1, like Mac OS X) AppleWebKit / 534.46 (KHTML, e.g. Gecko) Version /5.1 Mobile / 9A405 Safari / 7534.48.3
  • Mozilla / 5.0 (iPhone, iPhone OS 5 OS, like Mac OS X) AppleWebKit / 534.46 (KHTML, like Gecko) Version /5.1 Mobile / 9B179 Safari / 7534.48.3
  • Mozilla / 5.0 (Windows NT 6.1; WOW64; rv: 14.0) Gecko / 20100101 Firefox / 14.0

What is the actual web browser? According to the PHP manual, it will be [parent], [platform], [browser], [version], but why does it say that Safari and Chrome are on the same line, and why does "MSIE" appear in brackets?

+5
source share
3 answers

. - .

, , , , ; http://www.useragentstring.com/

API, .

+2

Mozilla 5.0 - ​​ , . , /.

get_browser, .

+1

As read from the PHP get_browser()documentation:

For output similar to: Mozilla / 5.0 (Windows; U; Windows NT 5.1; en-US; rv: 1.7) Gecko / 20040803 Firefox / 0.9.3 , the following information is retrieved:

[browser_name_regex] => '^mozilla/5\.0 (windows; .; windows nt 5\.1; .*rv:.*) gecko/.* firefox/0\.9.*$'
[browser_name_pattern] => 'Mozilla/5.0 (Windows; ?; Windows NT 5.1; *rv:*) Gecko/* Firefox/0.9*'
[parent] => 'Firefox 0.9'
[platform] => 'WinXP'
[browser] => 'Firefox'
[version] => 0.9
[majorver] => 0
[minorver] => 9
[cssversion] => 2
[frames] => 1
[iframes] => 1
[tables] => 1
[cookies] => 1
[backgroundsounds] =>
[vbscript] =>
[javascript] => 1
[javaapplets] => 1
[activexcontrols] =>
[cdf] =>
[aol] =>
[beta] => 1
[win16] =>
[crawler] =>
[stripper] =>
[wap] =>
[netclr] =>
0
source

All Articles