static public function isMobile()
    {
        if (isset($_SERVER['HTTP_VIA'])
            || isset($_SERVER['HTTP_X_NOKIA_CONNECTION_MODE'])
            || isset($_SERVER['HTTP_X_UP_CALLING_LINE_ID'])
            // Check whether the browser/gateway says it accepts WML.
            || isset($_SERVER['HTTP_ACCEPT']) && strpos(strtoupper($_SERVER['HTTP_ACCEPT']), "VND.WAP.WML") > 0 )
        {
            return true;
        }
        
        $browser = isset($_SERVER['HTTP_USER_AGENT']) ? trim($_SERVER['HTTP_USER_AGENT']) : '';
        $clientkeywords = array(
            'nokia', 'sony', 'ericsson', 'mot', 'samsung', 'htc', 'sgh', 'lg', 'sharp', 'sie-'
            , 'philips', 'panasonic', 'alcatel', 'lenovo', 'iphone', 'ipod', 'blackberry', 'meizu',
            'android', 'netfront', 'symbian', 'ucweb', 'windowsce', 'palm', 'operamini',
            'operamobi', 'opera mobi', 'openwave', 'nexusone', 'cldc', 'midp', 'wap', 'mobile'
        );
        if (preg_match("/(" . implode('|', $clientkeywords) . ")/i", $browser) && strpos($browser, 'ipad') === false) {
            return TRUE;
        } else {
            return FALSE;
        }
    }
static public function isMobile()
    {
        if (isset($_SERVER['HTTP_VIA'])
            || isset($_SERVER['HTTP_X_NOKIA_CONNECTION_MODE'])
            || isset($_SERVER['HTTP_X_UP_CALLING_LINE_ID'])
            // Check whether the browser/gateway says it accepts WML.
            || isset($_SERVER['HTTP_ACCEPT']) && strpos(strtoupper($_SERVER['HTTP_ACCEPT']), "VND.WAP.WML") > 0 )
        {
            return true;
        }
        
        $browser = isset($_SERVER['HTTP_USER_AGENT']) ? trim($_SERVER['HTTP_USER_AGENT']) : '';
        $clientkeywords = array(
            'nokia', 'sony', 'ericsson', 'mot', 'samsung', 'htc', 'sgh', 'lg', 'sharp', 'sie-'
            , 'philips', 'panasonic', 'alcatel', 'lenovo', 'iphone', 'ipod', 'blackberry', 'meizu',
            'android', 'netfront', 'symbian', 'ucweb', 'windowsce', 'palm', 'operamini',
            'operamobi', 'opera mobi', 'openwave', 'nexusone', 'cldc', 'midp', 'wap', 'mobile'
        );
        if (preg_match("/(" . implode('|', $clientkeywords) . ")/i", $browser) && strpos($browser, 'ipad') === false) {
            return TRUE;
        } else {
            return FALSE;
        }
    }
static public function isMobile ( ) { if ( isset ( $ _SERVER [ 'HTTP_VIA' ] ) || isset ( $ _SERVER [ 'HTTP_X_NOKIA_CONNECTION_MODE' ] ) || isset ( $ _SERVER [ 'HTTP_X_UP_CALLING_LINE_ID' ] ) // Check whether the browser/gateway says it accepts WML. || isset ( $ _SERVER [ 'HTTP_ACCEPT' ] ) && strpos ( strtoupper ( $ _SERVER [ 'HTTP_ACCEPT' ] ) , "VND.WAP.WML" ) > 0 ) { return true ; } $ browser = isset ( $ _SERVER [ 'HTTP_USER_AGENT' ] ) ? trim ( $ _SERVER [ 'HTTP_USER_AGENT' ] ) : '' ; $ clientkeywords = array ( 'nokia' , 'sony' , 'ericsson' , 'mot' , 'samsung' , 'htc' , 'sgh' , 'lg' , 'sharp' , 'sie-' , 'philips' , 'panasonic' , 'alcatel' , 'lenovo' , 'iphone' , 'ipod' , 'blackberry' , 'meizu' , 'android' , 'netfront' , 'symbian' , 'ucweb' , 'windowsce' , 'palm' , 'operamini' , 'operamobi' , 'opera mobi' , 'openwave' , 'nexusone' , 'cldc' , 'midp' , 'wap' , 'mobile' ) ; if ( preg_match ( "/(" . implode ( '|' , $ clientkeywords ) . ")/i" , $ browser ) && strpos ( $ browser , 'ipad' ) === false ) { return TRUE ; } else { return FALSE ; } }
if http is mobile
@return boolean
if http is mobile