Doorsturen als browser pda is ?
server.nl/pda/
Ik heb zelf al wat lopen proberen met http user agent
Maar dit werkt niet omdat elke pda een andere soort agent heeft
Je zult dus moeten zorgen voor een flinke lijst met user agents (Google daar even op) en de hele zooi in ene controle moeten zetten.
Alleen helaas werkte het script niet.
Code (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?PHP
// A file to redirect users based on their browsers.
$htmlredirect = "http://www.yahoo.com";
$wmlredirect = "http://wap41.com/hmv/"; if(strpos(strtoupper($_SERVER['HTTP_ACCEPT']),"VND.WAP.WML") > 0)
{
$br = "WML";
}
else
{
$browser=substr(trim($_SERVER['HTTP_USER_AGENT']),0,4);
if($browser=="Noki" || // Nokia phones and emulators
$browser=="Eric" || // Ericsson WAP phones and emulators
$browser=="WapI" || // Ericsson WapIDE 2.0
$browser=="MC21" || // Ericsson MC218
$browser=="AUR" || // Ericsson R320
$browser=="R380" || // Ericsson R380
$browser=="UP.B" || // UP.Browser
$browser=="WinW" || // WinWAP browser
$browser=="UPG1" || // UP.SDK 4.0
$browser=="upsi" || // another kind of UP.Browser ??
$browser=="QWAP" || // unknown QWAPPER browser
$browser=="Jigs" || // unknown JigSaw browser
$browser=="Java" || // unknown Java based browser
$browser=="Alca" || // unknown Alcatel-BE3 browser (UP based?)
$browser=="MITS" || // unknown Mitsubishi browser
$browser=="MOT-" || // unknown browser (UP based?)
$browser=="My S" || // unknown Ericsson devkit browser ?
$browser=="WAPJ" || // Virtual WAPJAG www.wapjag.de
$browser=="fetc" || // fetchpage.cgi Perl script from www.wapcab.de
$browser=="ALAV" || // yet another unknown UP based browser ?
$browser=="Wapa") // another unknown browser (”Wapalyzer”?)
{
$br = "WML";
}
else
{
$br = "HTML";
}
}
if($br == "WML")
{
header("302 Moved Temporarily");
header("Location: ".$wmlredirect);
exit;
}
else
{header("302 Moved Temporarily");
header("Location: ".$htmlredirect);
exit;
}
?>
// A file to redirect users based on their browsers.
$htmlredirect = "http://www.yahoo.com";
$wmlredirect = "http://wap41.com/hmv/"; if(strpos(strtoupper($_SERVER['HTTP_ACCEPT']),"VND.WAP.WML") > 0)
{
$br = "WML";
}
else
{
$browser=substr(trim($_SERVER['HTTP_USER_AGENT']),0,4);
if($browser=="Noki" || // Nokia phones and emulators
$browser=="Eric" || // Ericsson WAP phones and emulators
$browser=="WapI" || // Ericsson WapIDE 2.0
$browser=="MC21" || // Ericsson MC218
$browser=="AUR" || // Ericsson R320
$browser=="R380" || // Ericsson R380
$browser=="UP.B" || // UP.Browser
$browser=="WinW" || // WinWAP browser
$browser=="UPG1" || // UP.SDK 4.0
$browser=="upsi" || // another kind of UP.Browser ??
$browser=="QWAP" || // unknown QWAPPER browser
$browser=="Jigs" || // unknown JigSaw browser
$browser=="Java" || // unknown Java based browser
$browser=="Alca" || // unknown Alcatel-BE3 browser (UP based?)
$browser=="MITS" || // unknown Mitsubishi browser
$browser=="MOT-" || // unknown browser (UP based?)
$browser=="My S" || // unknown Ericsson devkit browser ?
$browser=="WAPJ" || // Virtual WAPJAG www.wapjag.de
$browser=="fetc" || // fetchpage.cgi Perl script from www.wapcab.de
$browser=="ALAV" || // yet another unknown UP based browser ?
$browser=="Wapa") // another unknown browser (”Wapalyzer”?)
{
$br = "WML";
}
else
{
$br = "HTML";
}
}
if($br == "WML")
{
header("302 Moved Temporarily");
header("Location: ".$wmlredirect);
exit;
}
else
{header("302 Moved Temporarily");
header("Location: ".$htmlredirect);
exit;
}
?>
Gewijzigd op 01/01/1970 01:00:00 door Frankyy
Ik heb iets nodig dat beter checkt dan het script hierboven