Skip to content

Commit 6124cdf

Browse files
committed
Update to code tabs
Changes to code Tabs
1 parent 918539e commit 6124cdf

File tree

1 file changed

+60
-59
lines changed

1 file changed

+60
-59
lines changed

useragent.class.php

Lines changed: 60 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -2,72 +2,74 @@
22
/*
33
PHP User Agent Class
44
Author: Tom Lloyd
5+
Company: TSL Designs
56
Date: 01/01/2015
67
*/
78
class UserAgent {
9+
810
public $os_array = array(
9-
'/windows nt 10/i' => 'Windows 10',
10-
'/windows phone 10/i' => 'Windows Phone 10',
11-
'/windows phone 8.1/i' => 'Windows Phone 8.1',
12-
'/windows phone 8/i' => 'Windows Phone 8',
13-
'/windows nt 6.3/i' => 'Windows 8.1',
14-
'/windows nt 6.2/i' => 'Windows 8',
15-
'/windows nt 6.1/i' => 'Windows 7',
16-
'/windows nt 6.0/i' => 'Windows Vista',
17-
'/windows nt 5.2/i' => 'Windows Server 2003/XP x64',
18-
'/windows nt 5.1/i' => 'Windows XP',
19-
'/windows xp/i' => 'Windows XP',
20-
'/windows nt 5.0/i' => 'Windows 2000',
21-
'/windows me/i' => 'Windows ME',
22-
'/win98/i' => 'Windows 98',
23-
'/win95/i' => 'Windows 95',
24-
'/win16/i' => 'Windows 3.11',
25-
'/macintosh|mac os x/i' => 'Mac OS X',
26-
'/mac_powerpc/i' => 'Mac OS 9',
27-
'/iphone/i' => 'iPhone',
28-
'/ipod/i' => 'iPod',
29-
'/ipad/i' => 'iPad',
30-
'/android/i' => 'Android',
31-
'/linux/i' => 'Linux',
32-
'/ubuntu/i' => 'Ubuntu',
33-
'/blackberry/i' => 'BlackBerry',
34-
'/webos/i' => 'Mobile'
11+
'/windows nt 10/i' => 'Windows 10',
12+
'/windows phone 10/i' => 'Windows Phone 10',
13+
'/windows phone 8.1/i' => 'Windows Phone 8.1',
14+
'/windows phone 8/i' => 'Windows Phone 8',
15+
'/windows nt 6.3/i' => 'Windows 8.1',
16+
'/windows nt 6.2/i' => 'Windows 8',
17+
'/windows nt 6.1/i' => 'Windows 7',
18+
'/windows nt 6.0/i' => 'Windows Vista',
19+
'/windows nt 5.2/i' => 'Windows Server 2003/XP x64',
20+
'/windows nt 5.1/i' => 'Windows XP',
21+
'/windows xp/i' => 'Windows XP',
22+
'/windows nt 5.0/i' => 'Windows 2000',
23+
'/windows me/i' => 'Windows ME',
24+
'/win98/i' => 'Windows 98',
25+
'/win95/i' => 'Windows 95',
26+
'/win16/i' => 'Windows 3.11',
27+
'/macintosh|mac os x/i' => 'Mac OS X',
28+
'/mac_powerpc/i' => 'Mac OS 9',
29+
'/iphone/i' => 'iPhone',
30+
'/ipod/i' => 'iPod',
31+
'/ipad/i' => 'iPad',
32+
'/android/i' => 'Android',
33+
'/linux/i' => 'Linux',
34+
'/ubuntu/i' => 'Ubuntu',
35+
'/blackberry/i' => 'BlackBerry',
36+
'/webos/i' => 'Mobile'
3537
);
3638
public $browser_array = array(
37-
'/mobile/i' => 'Handheld Browser',
38-
'/msie/i' => 'Internet Explorer',
39-
'/firefox/i' => 'Firefox',
40-
'/safari/i' => 'Safari',
41-
'/chrome/i' => 'Chrome',
42-
'/edge/i' => 'Edge',
43-
'/opera/i' => 'Opera',
44-
'/netscape/i' => 'Netscape',
45-
'/maxthon/i' => 'Maxthon',
46-
'/konqueror/i' => 'Konqueror'
39+
'/mobile/i' => 'Handheld Browser',
40+
'/msie/i' => 'Internet Explorer',
41+
'/firefox/i' => 'Firefox',
42+
'/safari/i' => 'Safari',
43+
'/chrome/i' => 'Chrome',
44+
'/edge/i' => 'Edge',
45+
'/opera/i' => 'Opera',
46+
'/netscape/i' => 'Netscape',
47+
'/maxthon/i' => 'Maxthon',
48+
'/konqueror/i' => 'Konqueror'
4749
);
4850
public $isps = array(
49-
'/virgin media/i' => 'Virgin Media',
50-
'/bt|british telecom|britishtelecom/i' => 'BT', // confirmed
51-
'/talktalk/i' => 'TalkTalk',
52-
'/skybroadband|sky/i' => 'Sky Broadband', // confirmed
53-
'/plusnet/i' => 'Plusnet',
54-
'/three/i' => 'Three',
55-
'/ee/i' => 'EE',
56-
'/nowtv| now tv/i' => 'Now TV',
57-
'/xlnbroadband|xln broadband/i' => 'XLN Broadband',
58-
'/vodafone/i' => 'Vodafone',
59-
'/sse/i' => 'SSE',
60-
'/postoffice|post office/i' => 'Post Office',
61-
'/vondage/i' => 'Vondage',
62-
'/johnlewis|john lewis/i' => 'John Lewis',
63-
'/tmobile|t mobile|t-mobile/i' => 'T-Mobile',
64-
'/orange/i' => 'Orange',
65-
'/tesco/i' => 'Tesco',
66-
'/tiscali/i' => 'Tiscali',
67-
'/aol/i' => 'AOL',
68-
'/tentel/i' => 'TenTel',
69-
'/myvzw/i' => 'Verizon Trademark Services LLC',
70-
'/verizon/i' => 'Verizon'
51+
'/virgin media/i' => 'Virgin Media',
52+
'/bt|british telecom|britishtelecom/i' => 'BT', // confirmed
53+
'/talktalk/i' => 'TalkTalk',
54+
'/skybroadband|sky/i' => 'Sky Broadband', // confirmed
55+
'/plusnet/i' => 'Plusnet',
56+
'/three/i' => 'Three',
57+
'/ee/i' => 'EE',
58+
'/nowtv| now tv/i' => 'Now TV',
59+
'/xlnbroadband|xln broadband/i' => 'XLN Broadband',
60+
'/vodafone/i' => 'Vodafone',
61+
'/sse/i' => 'SSE',
62+
'/postoffice|post office/i' => 'Post Office',
63+
'/vondage/i' => 'Vondage',
64+
'/johnlewis|john lewis/i' => 'John Lewis',
65+
'/tmobile|t mobile|t-mobile/i' => 'T-Mobile',
66+
'/orange/i' => 'Orange',
67+
'/tesco/i' => 'Tesco',
68+
'/tiscali/i' => 'Tiscali',
69+
'/aol/i' => 'AOL',
70+
'/tentel/i' => 'TenTel',
71+
'/myvzw/i' => 'Verizon Trademark Services LLC',
72+
'/verizon/i' => 'Verizon'
7173
);
7274
public $os_platform = "OS Platform not Detected.";
7375
public $browser = "Browser not Detected.";
@@ -200,4 +202,3 @@ public function user_agent(){
200202
return $this->user_agent;
201203
}
202204
}
203-
?>

0 commit comments

Comments
 (0)