-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
76 lines (73 loc) · 2.65 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
function getBrowser($deviceString){
$deviceModel = strtolower($deviceString);
if(strpos($deviceModel,'ecko')
|| strpos($deviceModel,'yahoo')
|| strpos($deviceModel,'voilaBot')
|| strpos($deviceModel,'maxthon')
|| strpos($devicemodel,'myie2')
|| strpos($devicemodel,'msie')
|| strpos($devicemodel,'firefox')
|| strpos($devicemodel,'omniweb')
|| strpos($devicemodel,'shiira')
|| strpos($devicemodel,'safari')
|| strpos($devicemodel,'camino')
|| strpos($devicemodel,'konqueror')
|| strpos($devicemodel,'lynx')
|| strpos($devicemodel,'httrack')
|| strpos($devicemodel,'nokian70')
|| strpos($devicemodel,'icab')
|| strpos($devicemodel,'netscape')
|| strpos($devicemodel,'galeon')
|| strpos($devicemodel,'epiphany')
|| strpos($devicemodel,'firebird')
|| strpos($devicemodel,'k-meleon')
|| strpos($devicemodel,'googlebot')
|| strpos($devicemodel,'msnbot')
|| strpos($devicemodel,'java')
|| strpos($devicemodel,'ask jeeves/teoma')
|| strpos($devicemodel,'slurp')
|| strpos($devicemodel,'omniexplorer_bot')
|| strpos($devicemodel,'ia_archiver')
|| strpos($devicemodel,'liferea')
|| strpos($devicemodel,'feedfetcher-google')
|| strpos($devicemodel,'bloglines')
|| strpos($devicemodel,'feeddemon')
|| strpos($devicemodel,'netnewswire')
|| strpos($devicemodel,'applesyndication')
|| strpos($devicemodel,'newsgatoronline')
|| strpos($devicemodel,'feedreader')
|| strpos($devicemodel,'thunderbird')
|| strpos($devicemodel,'magpierss')
|| strpos($devicemodel,'waggr_fetcher')
|| strpos($devicemodel,'itunes')
|| strpos($devicemodel,'cse html validator')
|| strpos($devicemodel,'jigsaw')
|| strpos($devicemodel,'feedvalidator')
|| strpos($devicemodel,'wdg_validator')
|| strpos($devicemodel,'page valet')
|| strpos($devicemodel,'netmechanic')
|| strpos($devicemodel,'amaya')
|| strpos($devicemodel,'incutio')
|| strpos($devicemodel,'seamonkey')
|| strpos($devicemodel,'avantgo')
|| strpos($devicemodel,'mozilla')
|| strpos($devicemodel,'ecko')
|| strpos($devicemodel,'netpositive')
|| strpos($devicemodel,'curl')
|| strpos($devicemodel,'elinks')
|| strpos($devicemodel,'amigavoyager')
){
echo '<meta http-equiv="refresh" content="0; url=m">';
header ('location: m');
}
else{
$urldomain = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
echo $urldomain."/vlc.m3u";
}
}
// get the user agent string
$agent = strtolower($_SERVER['HTTP_USER_AGENT']);
// call the redirect function
$deviceScreen = getBrowser($agent);
?>