diff options
Diffstat (limited to 'forum/utils/clientinfo.php')
-rw-r--r-- | forum/utils/clientinfo.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/forum/utils/clientinfo.php b/forum/utils/clientinfo.php new file mode 100644 index 0000000..cbb7a4d --- /dev/null +++ b/forum/utils/clientinfo.php @@ -0,0 +1,24 @@ +<?php +/* +Jonas Mobil: +"SonyEricssonW660i/R6BC Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1" + +Rasmus Mobil: +"Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaN81-3/11.0.045 Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413" +*/ + + //echo $_SERVER['HTTP_USER_AGENT'] . "<br/>"; +$client_is_mobile_device = + stripos($_SERVER['HTTP_USER_AGENT'], "MIDP") != FALSE + || stripos($_SERVER['HTTP_USER_AGENT'], "Nokia") != FALSE + || stripos($_SERVER['HTTP_USER_AGENT'], "Sony") != FALSE + || stripos($_SERVER['HTTP_USER_AGENT'], "Ericson") != FALSE + || $_GET['forcemobile']; + +//$client_is_mobile_device = !$client_is_mobile_device; +/* +echo "client_is_mobile_device = "; +if($client_is_mobile_device) echo "yes"; + else echo "no"; +*/ +?>
\ No newline at end of file |