http://www.websitebaker.org/forum/index ... 589.0.html
bzw. dessen Grundidee habe ich ein Modul lib_mdetect erstellt. Beispielcode:
Code: Alles auswählen
include CAT_PATH.'/modules/lib_mdetect/include.php';
echo "Test1: isMobile -", isMobile(), "-<br />";
echo "Test2: isBlackBerry -", isBlackBerry(), "-<br />";
echo "Test3: whatMobile -", whatMobile(), "-<br />";
Code: Alles auswählen
require_once CAT_PATH.'/modules/lib_mdetect/mdetect/mdetect.php';
$uagent_obj = new uagent_info();
if ($uagent_obj->DetectMobileQuick() == $uagent_obj->true)
{
// do something special
}
Zusätzlich gibt es noch ein paar weitere:
'isJavascript' => 'DetectTierIphone',
'isMobile' => 'DetectMobileLong',
'isSmartPhone' => 'DetectSmartphone',
'isTablet' => 'DetectTierTablet',
'isWap' => 'DetectWapWml'