1<?php if (!defined('BB2_CORE')) die('I said no cheating!');
2
3// Analyze user agents claiming to be MSIE
4
5function bb2_msie($package)
6{
7	if (!array_key_exists('Accept', $package['headers_mixed'])) {
8		return "17566707";
9	}
10
11	// MSIE does NOT send "Windows ME" or "Windows XP" in the user agent
12	if (strpos($package['headers_mixed']['User-Agent'], "Windows ME") !== FALSE || strpos($package['headers_mixed']['User-Agent'], "Windows XP") !== FALSE || strpos($package['headers_mixed']['User-Agent'], "Windows 2000") !== FALSE || strpos($package['headers_mixed']['User-Agent'], "Win32") !== FALSE) {
13		return "a1084bad";
14	}
15
16	// MSIE does NOT send Connection: TE but Akamai does
17	// Bypass this test when Akamai detected
18	// The latest version of IE for Windows CE also uses Connection: TE
19	if (!array_key_exists('Akamai-Origin-Hop', $package['headers_mixed']) && strpos($package['headers_mixed']['User-Agent'], "IEMobile") === FALSE && @preg_match('/\bTE\b/i', $package['headers_mixed']['Connection'])) {
20		return "2b90f772";
21	}
22
23	return false;
24}
25
26?>
27