ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/BBClone/trunk/lib/os.php
Revision: 25
Committed: Fri Nov 22 12:08:57 2013 UTC (11 years ago) by matthys
File size: 17883 byte(s)
Log Message:
Corrected detection order (first Windows RT and then 8)

File Contents

# Content
1 <?php
2 /* This file is part of BBClone (A PHP based Web Counter on Steroids)
3 *
4 * SVN FILE $Id$
5 *
6 * Copyright (C) 2001-2013, the BBClone Team (see doc/authors.txt for details)
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * See doc/copying.txt for details
19 */
20
21 /////////////////////////////////////
22 // OS (Operation System) Detection //
23 /////////////////////////////////////
24
25 $os = array(
26 "aix"=> array(
27 "icon"=> "aix",
28 "title" => "AIX",
29 "rule" => array(
30 "-aix([0-9.]{1,10})" => "\\1",
31 "[ ;\(]aix" => ""
32 ),
33 "uri" => ""
34 ),
35 "amiga" => array(
36 "icon" => "amiga",
37 "title" => "AmigaOS",
38 "rule" => array(
39 "Amiga[ ]?OS[ /]([0-9.V]{1,10})" => "\\1",
40 "amiga" => ""
41 ),
42 "uri" => ""
43 ),
44 "android" => array(
45 "icon" => "android",
46 "title" => "Android",
47 "rule" => array(
48 "Android ([0-9.]{1,10})" => "\\1",
49 "Android" => ""
50 ),
51 "uri" => "http://www.android.com/"
52 ),
53 "arch" => array(
54 "icon" => "arch",
55 "title" => "Arch Linux",
56 "rule" => array(
57 "Arch Linux" => ""
58 ),
59 "uri" => "http://www.archlinux.org/"
60 ),
61 "atari" => array(
62 "icon" => "question",
63 "title" => "Atari",
64 "rule" => array(
65 "atari[ /]([0-9.b]{1,10})" => "\\1"
66 ),
67 "uri" => "http://www.atari.com/"
68 ),
69 "atheos" => array(
70 "icon" => "atheos",
71 "title" => "AtheOS",
72 "rule" => array(
73 "atheos" => ""
74 ),
75 "uri" => ""
76 ),
77 "bada" => array(
78 "icon" => "bada",
79 "title" => "Bada",
80 "rule" => array(
81 "Bada[ /]([0-9]{1,10})" => "\\1"
82 ),
83 "uri" => "http://www.bada.com/"
84 ),
85 "blackberry" => array(
86 "icon" => "blackberry",
87 "title" => "BlackBerry OS",
88 "rule" => array(
89 "BlackBerry" => ""
90 ),
91 "uri" => "http://www.blackberry.com/"
92 ),
93 "bluecoat" => array(
94 "icon" => "bluecoat",
95 "title" => "Bluecoat DRTR",
96 "rule" => array(
97 "bluecoat drtr" => "\\1"
98 ),
99 "uri" => ""
100 ),
101 "brew" => array(
102 "icon" => "brewmp",
103 "title" => "Brew MP",
104 "rule" => array(
105 "BREW[ /]([0-9.]{1,10})" => "\\1"
106 ),
107 "uri" => "http://www.brewmp.com/"
108 ),
109 "centos" => array(
110 "icon" => "centos",
111 "title" => "CentOS",
112 "rule" => array(
113 "centos([0-9]{1})" => "\\1",
114 "el([0-9.]{1}).*centos" => "\\1",
115 "CentOS" => ""
116 ),
117 "uri" => "http://www.centos.org/"
118 ),
119 "cerberian" => array(
120 "icon" => "bluecoat",
121 "title" => "Cerberian DRTR",
122 "rule" => array(
123 "Cerberian Drtrs Version[ /\-]([0-9.]{1,10})" => "\\1"
124 ),
125 "uri" => ""
126 ),
127 "c64" => array(
128 "icon" => "c64",
129 "title" => "Commodore 64",
130 "rule" => array(
131 "Commodore[ ]?64" => ""
132 ),
133 "uri" => ""
134 ),
135 "darwin" => array(
136 "icon" => "darwin",
137 "title" => "Darwin",
138 "rule" => array(
139 "Darwin[ ]?([0-9.]{1,10})" => "\\1",
140 "Darwin" => ""
141 ),
142 "uri" => ""
143 ),
144 "digital" => array(
145 "icon" => "digital",
146 "title" => "Digital",
147 "rule" => array(
148 "OSF[0-9][ ]?V(4[0-9.]{1,10})" => "\\1"
149 ),
150 "uri" => ""
151 ),
152 "dreamcast" => array(
153 "icon" => "dreamcast",
154 "title" => "SEGA Dreamcast",
155 "rule" => array(
156 "\(SonicPassport\)" => "",
157 "\(Dream(Passport|Key)[ /]([0-9.]{1,10})\)" => "",
158 "\(Dream(Passport|Key)[ /]([0-9.]{1,10}); ([A-Z.a-z/]{1,50})\)" => "",
159 "\(Planetweb[ /]([0-9.a-z]{1,10})" => ""
160 ),
161 "uri" => "http://css.vis.ne.jp/dp-agent.shtml"
162 ),
163 "embedix" => array(
164 "icon" => "question",
165 "title" => "Embedix",
166 "rule" => array(
167 "Embedix" => ""
168 ),
169 "uri" => ""
170 ),
171 "Fedora Linux" => array(
172 "icon" => "fedora",
173 "title" => "Fedora Linux",
174 "rule" => array(
175 "Fedora/[0-9.-]+fc([0-9]+)" => "\\1",
176 "fedora" => ""
177 ),
178 "uri" => "http://fedoraproject.org/"
179 ),
180 "fenix" => array(
181 "icon" => "question",
182 "title" => "Fenix",
183 "rule" => array(
184 "Fenix" => ""
185 ),
186 "uri" => ""
187 ),
188 "freebsd" => array(
189 "icon" => "freebsd",
190 "title" => "FreeBSD",
191 "rule" => array(
192 "free[ \-]?bsd[ /]([a-z0-9._]{1,10})" => "\\1",
193 "free[ \-]?bsd" => ""
194 ),
195 "uri" => "http://www.freebsd.org/"
196 ),
197 "gentoo" => array(
198 "icon" => "gentoo",
199 "title" => "Gentoo Linux",
200 "rule" => array(
201 "gentoo" => ""
202 ),
203 "uri" => "http://www.gentoo.org/"
204 ),
205 "haiku" => array(
206 "icon" => "haiku",
207 "title" => "Haiku",
208 "rule" => array(
209 "Haiku BePC" => ""
210 ),
211 "uri" => "http://www.haiku-os.org/"
212 ),
213 "hiptop" => array(
214 "icon" => "question",
215 "title" => "hiptop",
216 "rule" => array(
217 "Danger hiptop ([0-9.]{1,10})" => "\\1"
218 ),
219 "uri" => ""
220 ),
221 "hpux" => array(
222 "icon" => "hp",
223 "title" => "HPUX",
224 "rule" => array(
225 "hp[ \-]?ux[ /]([a-z0-9._]{1,10})" => "\\1"
226 ),
227 "uri" => ""
228 ),
229 "ios" => array(
230 "icon" => "ios",
231 "title" => "iOS",
232 "rule" => array(
233 "i(Phone|Pod|Pad).*OS[ /]([0-9]{1,10})_([0-9]{1,10})" => "\\2.\\3",
234 "i(Phone|Pod|Pad)" => ""
235 ),
236 "uri" => "http://www.apple.com/ios/"
237 ),
238 "irix" => array(
239 "icon" => "irix",
240 "title" => "IRIX",
241 "rule" => array(
242 "irix[0-9]*[ /]([0-9.]{1,10})" => "\\1",
243 "irix" => ""
244 ),
245 "uri" => ""
246 ),
247 "macosx" => array(
248 "icon" => "macosx",
249 "title" => "MacOS X",
250 "rule" => array(
251 "Mac[ _]OS[ _]X[ /_]([0-9]{1,10})[._]([0-9]{1,10})[._]([0-9]{1,10})" => "\\1.\\2.\\3",
252 "Mac[ _]OS[ _]X[ /_]([0-9]{1,10})[._]([0-9]{1,10})" => "\\1.\\2",
253 "Mac[ _]OS[ _]X" => "",
254 "Mac 10.([0-9.]{1,10})" => "\\1"
255 ),
256 "uri" => "http://www.apple.com/macosx/"
257 ),
258 "macppc" => array(
259 "icon" => "macppc",
260 "title" => "MacOS PPC",
261 "rule" => array(
262 "Mac(_Power|intosh.+P)PC" => ""
263 ),
264 "uri" => ""
265 ),
266 "mandriva" => array(
267 "icon" => "mandriva",
268 "title" => "Mandriva",
269 "rule" => array(
270 "Mandriva[ /]([0-9.]{1,10})" => "\\1",
271 "Linux[ /\-]([0-9.-]{1,10}).mdk" => "",
272 "Linux[ /\-]([0-9.-]{1,10}).mdv" => "\\1"
273 ),
274 "uri" => "http://www.mandriva.com/"
275 ),
276 "mint" => array(
277 "icon" => "mint",
278 "title" => "Linux Mint",
279 "rule" => array(
280 "Linux Mint[/ ]?([0-9.]{1,10})?" => "\\1"
281 ),
282 "uri" => ""
283 ),
284 "morphos" => array(
285 "icon" => "morphos",
286 "title" => "MorphOS",
287 "rule" => array(
288 "MorphOS[ /]([0-9.]{1,10})" => "\\1",
289 "MorphOS" => ""
290 ),
291 "uri" => ""
292 ),
293 "netbsd" => array(
294 "icon" => "netbsd",
295 "title" => "NetBSD",
296 "rule" => array(
297 "net[ \-]?bsd[ /]([a-z0-9._]{1,10})" => "\\1",
298 "net[ \-]?bsd" => ""
299 ),
300 "uri" => ""
301 ),
302 "nintendods" => array(
303 "icon" => "ds",
304 "title" => "Nintento DS",
305 "rule" => array(
306 "Nintendo DS v([0-9.]{1,10})" => ""
307 ),
308 "uri" => ""
309 ),
310 "openbsd" => array(
311 "icon" => "openbsd",
312 "title" => "OpenBSD",
313 "rule" => array(
314 "open[ \-]?bsd[ /]([a-z0-9._]{1,10})" => "\\1",
315 "open[ \-]?bsd" => ""
316 ),
317 "uri" => ""
318 ),
319 "openvms" => array(
320 "icon" => "openvms",
321 "title" => "OpenVMS",
322 "rule" => array(
323 "Open[ \-]?VMS[ /]([a-z0-9._]{1,10})" => "\\1",
324 "Open[ \-]?VMS" => ""
325 ),
326 "uri" => ""
327 ),
328 "palm" => array(
329 "icon" => "palm",
330 "title" => "PalmOS",
331 "rule" => array(
332 "Palm[ \-]?(Source|OS)[ /]?([0-9.]{1,10})" => "\\2",
333 "Palm[ \-]?(Source|OS)" => ""
334 ),
335 "uri" => ""
336 ),
337 "pclinux" => array(
338 "icon" => "pclinux",
339 "title" => "PCLinuxOS",
340 "rule" => array(
341 "PCLinuxOS[ /]?([0-9.]{1,10})" => "\\1"
342 ),
343 "uri" => "http://www.pclinuxos.com/"
344 ),
345 "photon" => array(
346 "icon" => "qnx",
347 "title" => "QNX Photon",
348 "rule" => array(
349 "photon" => "",
350 "QNX" => ""
351 ),
352 "uri" => "http://www.qnx.com/"
353 ),
354 "psp" => array(
355 "icon" => "playstation",
356 "title" => "PlayStation Portable",
357 "rule" => array(
358 "PlayStation Portable.* ([0-9._]{1,10})" => "\\1",
359 "PlayStation Portable" => ""
360 ),
361 "uri" => ""
362 ),
363 "playstation" => array(
364 "icon" => "playstation",
365 "title" => "PlayStation",
366 "rule" => array(
367 "PlayStation" => "",
368 "PS2" => ""
369 ),
370 "uri" => ""
371 ),
372 "pld" => array(
373 "icon" => "pld",
374 "title" => "PLD Linux",
375 "rule" => array(
376 "PLD[ /]?([0-9.]{1,10})" => "\\1",
377 "PLD" => ""
378 ),
379 "uri" => "http://www.pld-linux.org/"
380 ),
381 "reactos" => array(
382 "icon" => "reactos",
383 "title" => "ReactOS",
384 "rule" => array(
385 "ReactOS[ /]?([0-9.]{1,10})" => "\\1",
386 "ReactOS" => ""
387 ),
388 "uri" => "http://www.reactos.org/"
389 ),
390 "redhat" => array(
391 "icon" => "redhat",
392 "title" => "RedHat",
393 "rule" => array(
394 "Red Hat[ /]?([0-9.]{1,10})" => "\\1",
395 "RedHat" => ""
396 ),
397 "uri" => "http://www.redhat.com/"
398 ),
399 "risc" => array(
400 "icon" => "risc",
401 "title" => "RiscOS",
402 "rule" => array(
403 "risc[ \-]?os[ /]?([0-9.]{1,10})" => "\\1",
404 "risc[ \-]?os" => ""
405 ),
406 "uri" => ""
407 ),
408 "slitaz" => array(
409 "icon" => "slitaz",
410 "title" => "SliTaz Linux",
411 "rule" => array(
412 "SliTaz" => ""
413 ),
414 "uri" => "http://www.slitaz.org/"
415 ),
416 "suse" => array(
417 "icon" => "suse",
418 "title" => "SuSE Linux",
419 "rule" => array(
420 "suse" => ""
421 ),
422 "uri" => "http://www.novell.com/linux/"
423 ),
424 "sun" => array(
425 "icon" => "sun",
426 "title" => "SunOS",
427 "rule" => array(
428 "sun[ \-]?os[ /]?([0-9.]{1,10})" => "\\1",
429 "sun[ \-]?os" => "",
430 "^SUNPlex[ /]?([0-9.]{1,10})" => "\\1"
431 ),
432 "uri" => ""
433 ),
434 "symbian" => array(
435 "icon" => "symbian",
436 "title" => "Symbian OS",
437 "rule" => array(
438 "symbian[ \-]?os[ /]?([0-9.]{1,10})" => "\\1",
439 "symbOS" => "",
440 "symbian" => ""
441 ),
442 "uri" => ""
443 ),
444 "trisquel" => array(
445 "icon" => "trisquel",
446 "title" => "Trisquel GNU Linux",
447 "rule" => array(
448 "Trisquel[ /]([0-9.]{1,10})" => "\\1"
449 ),
450 "uri" => "http://trisquel.info/"
451 ),
452 "tru64" => array(
453 "icon" => "tru64",
454 "title" => "Tru64",
455 "rule" => array(
456 "OSF[0-9][ ]?V(5[0-9.]{1,10})" => "\\1"
457 ),
458 "uri" => ""
459 ),
460 "ubuntu" => array(
461 "icon" => "ubuntu",
462 "title" => "Ubuntu Linux",
463 "rule" => array(
464 "ubuntu/([0-9.]+)" => "\\1",
465 "ubuntu" => ""
466 ),
467 "uri" => "http://www.ubuntu.com/"
468 ),
469 "unixware" => array(
470 "icon" => "sco",
471 "title" => "UnixWare",
472 "rule" => array(
473 "unixware[ /]?([0-9.]{1,10})" => "\\1",
474 "unixware" => ""
475 ),
476 "uri" => ""
477 ),
478 "wii" => array(
479 "icon" => "wii",
480 "title" => "Wii",
481 "rule" => array(
482 "^Nintendo Wii" => "",
483 " wii" => ""
484 ),
485 "uri" => "http://www.wii.com/"
486 ),
487 "webos" => array(
488 "icon" => "palm",
489 "title" => "web OS",
490 "rule" => array(
491 "webOS[ /]?([0-9.]{1,10})" => "\\1"
492 ),
493 "uri" => "http://www.palm.com/"
494 ),
495 "windowsxp64" => array(
496 "icon" => "windowsxp",
497 "title" => "Windows XP (64-bit)",
498 "rule" => array(
499 "wi(n|ndows)[ \-]?(2003|nt[ /]?5\.2).*(WOW64|Win64)" => ""
500 ),
501 "uri" => "http://www.microsoft.com/windowsxp/64bit/"
502 ),
503 "windows2003" => array(
504 "icon" => "windowsxp",
505 "title" => "Windows 2003",
506 "rule" => array(
507 "wi(n|ndows)[ \-]?(2003|nt[ /]?5\.2)" => ""
508 ),
509 "uri" => "http://www.microsoft.com/windowsserver2003/"
510 ),
511 "windows2k" => array(
512 "icon" => "windows",
513 "title" => "Windows 2000",
514 "rule" => array(
515 "wi(n|ndows)[ \-]?(2000|nt[ /]?5\.0)" => ""
516 ),
517 "uri" => "http://www.microsoft.com/windows2000/"
518 ),
519 "windows31" => array(
520 "icon" => "windows31",
521 "title" => "Windows 3.1",
522 "rule" => array(
523 "wi(n|ndows)[ \-]?3\.[1]+" => "",
524 "Win16" => ""
525 ),
526 "uri" => ""
527 ),
528 "windows95" => array(
529 "icon" => "windows",
530 "title" => "Windows 95",
531 "rule" => array(
532 "wi(n|ndows)[ \-]?95" => ""
533 ),
534 "uri" => "http://www.microsoft.com/windows95/"
535 ),
536 "windowsce" => array(
537 "icon" => "windowsce",
538 "title" => "Windows CE",
539 "rule" => array(
540 "wi(n|ndows)[ \-]?ce" => "",
541 "wi(n|ndows)[ /.;]*mobile" => "",
542 "(Microsoft|Windows) Pocket" => ""
543 ),
544 "uri" => "http://www.microsoft.com/windows/embedded/"
545 ),
546 "windowsme" => array(
547 "icon" => "windowsme",
548 "title" => "Windows ME",
549 "rule" => array(
550 "win 9x 4\.90" => "",
551 "wi(n|ndows)[ \-]?me" => ""
552 ),
553 "uri" => "http://www.microsoft.com/windowsme/"
554 ),
555 "windowsvista" => array(
556 "icon" => "windowsvista",
557 "title" => "Windows Vista",
558 "rule" => array(
559 "Windows Vista" => "",
560 "wi(n|ndows)[ \-]?nt[ /]?6\.0" => "",
561 "wi(n|ndows)[ \-]?6\.0" => ""
562 ),
563 "uri" => "http://www.microsoft.com/windowsvista/"
564 ),
565 "windows7" => array(
566 "icon" => "windows7",
567 "title" => "Windows 7",
568 "rule" => array(
569 "wi(n|ndows)[ \-]?nt[ /]?6\.1" => ""
570 ),
571 "uri" => "http://www.microsoft.com/windows/windows-7/"
572 ),
573 "windowsrt" => array(
574 "icon" => "windows8",
575 "title" => "Windows RT",
576 "rule" => array(
577 "wi(n|ndows)[ \-]?nt[ /]?6\.2;ARM" => "",
578 "wi(n|ndows)[ \-]?nt[ /]?6\.3;ARM" => ""
579 ),
580 "uri" => "http://www.microsoft.com/windows/"
581 ),
582 "windows8" => array(
583 "icon" => "windows8",
584 "title" => "Windows 8",
585 "rule" => array(
586 "wi(n|ndows)[ \-]?nt[ /]?6\.2" => "",
587 "wi(n|ndows)[ \-]?nt[ /]?6\.3" => ""
588 ),
589 "uri" => "http://www.microsoft.com/windows/"
590 ),
591 "windowsmc" => array(
592 "icon" => "windowsxp",
593 "title" => "Windows Media Center",
594 "rule" => array(
595 "Media Center PC[ /]([0-9.]{1,10})" => "\\1"
596 ),
597 "uri" => "http://www.microsoft.com/windowsxp/mediacenter/"
598 ),
599 "windowsxp" => array(
600 "icon" => "windowsxp",
601 "title" => "Windows XP",
602 "rule" => array(
603 "Windows XP" => "",
604 "wi(n|ndows)[ \-]?nt[ /]?5\.1" => ""
605 ),
606 "uri" => "http://www.microsoft.com/windowsxp/"
607 ),
608 "zenwalk" => array(
609 "icon" => "zenwalk",
610 "title" => "Zenwalk",
611 "rule" => array(
612 "Zenwalk GNU Linux" => ""
613 ),
614 "uri" => "http://www.zenwalk.org/"
615 ),
616 // Catch up for the originals, they got to stay in that order.
617 "debian" => array(
618 "icon" => "debian",
619 "title" => "Debian Linux",
620 "rule" => array(
621 "debian" => ""
622 ),
623 "uri" => "http://www.debian.org/"
624 ),
625 "beos" => array(
626 "icon" => "be",
627 "title" => "BeOS",
628 "rule" => array(
629 "beos[ a-z]*([0-9.]{1,10})" => "\\1",
630 "beos" => ""
631 ),
632 "uri" => ""
633 ),
634 "bsd" => array(
635 "icon" => "bsd",
636 "title" => "BSD",
637 "rule" => array(
638 "bsd" => ""
639 ),
640 "uri" => ""
641 ),
642 "linux" => array(
643 "icon" => "linux",
644 "title" => "Linux",
645 "rule" => array(
646 "linux[ /\-]([a-z0-9._]{1,10})" => "\\1",
647 "linux" => ""
648 ),
649 "uri" => "http://www.kernel.org/"
650 ),
651 "os2" => array(
652 "icon" => "os2",
653 "title" => "OS/2 Warp",
654 "rule" => array(
655 "warp[ /]?([0-9.]{1,10})" => "\\1",
656 "os[ /]?2" => ""
657 ),
658 "uri" => ""
659 ),
660 "mac" => array(
661 "icon" => "mac",
662 "title" => "MacOS",
663 "rule" => array(
664 "mac[^hk]" => ""
665 ),
666 "uri" => ""
667 ),
668 "windowsnt" => array(
669 "icon" => "windows",
670 "title" => "Windows NT",
671 "rule" => array(
672 "wi(n|ndows)[ \-]?nt[ /]?([0-4][0-9.]{1,10})" => "\\2",
673 "wi(n|ndows)[ \-][ /]?([0-4][0-9.]{1,10})" => "\\2",
674 "wi(n|ndows)[ \-]?nt" => ""
675 ),
676 "uri" => "http://www.microsoft.com/windowsnt/"
677 ),
678 "windows98" => array(
679 "icon" => "windows",
680 "title" => "Windows 98",
681 "rule" => array(
682 "wi(n|ndows)[ \-]?98" => ""
683 ),
684 "uri" => "http://www.microsoft.com/windows98/"
685 ),
686 "windows" => array(
687 "icon" => "windows",
688 "title" => "Windows",
689 "rule" => array(
690 "wi(n|n32|n64|ndows)" => ""
691 ),
692 "uri" => ""
693 ),
694 "java" => array(
695 "icon" => "java",
696 "title" => "Java Platform Micro Edition",
697 "rule" => array(
698 "J2ME/MIDP" => ""
699 ),
700 "uri" => "http://java.sun.com/"
701 ),
702 "mobile" => array(
703 "icon" => "mobile",
704 "title" => "Mobile",
705 "rule" => array(
706 "LG[ /]([0-9A-Z]{1,10})" => "",
707 "MOT[ /\-]([0-9A-Z]{1,10})" => "",
708 "SonyEricsson([0-9A-Z]{1,10})" => "",
709 "SIE([0-9A-Z]{1,10})" => "",
710 "Nokia([0-9A-Z]{1,10})" => "",
711 "KDDI-([0-9A-Z]{1,10})" => "",
712 "^[A-Z]([0-9]{1,3}) " => "",
713 "Configuration[ /]CLDC([0-9.]{1,10})" => "\\1",
714 "MIDP" => "",
715 "UP\.(Browser|Link)" => "",
716 "ibisBrowser" => ""
717 ),
718 "uri" => ""
719 ),
720 // Things we don't know by now
721 "other" => array(
722 "icon" => "question",
723 "title" => "other",
724 "rule" => array(
725 ".*" => ""
726 )
727 )
728 );
729 ?>

Properties

Name Value
svn:keywords Id