public function isMobile()
    {
        $s = $this->server;
        if (
            isset($s['HTTP_ACCEPT']) &&
                (strpos($s['HTTP_ACCEPT'], 'application/x-obml2d') !== false || // Opera Mini; @reference: http://dev.opera.com/articles/view/opera-binary-markup-language/
                 strpos($s['HTTP_ACCEPT'], 'application/vnd.rim.html') !== false || // BlackBerry devices.
                 strpos($s['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false ||
                 strpos($s['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false) ||
            isset($s['HTTP_X_WAP_PROFILE'])             ||
            isset($s['HTTP_X_WAP_CLIENTID'])            ||
            isset($s['HTTP_WAP_CONNECTION'])            ||
            isset($s['HTTP_PROFILE'])                   ||
            isset($s['HTTP_X_OPERAMINI_PHONE_UA'])      || // Reported by Nokia devices (eg. C3)
            isset($s['HTTP_X_NOKIA_IPADDRESS'])         ||
            isset($s['HTTP_X_NOKIA_GATEWAY_ID'])        ||
            isset($s['HTTP_X_ORANGE_ID'])               ||
            isset($s['HTTP_X_VODAFONE_3GPDPCONTEXT'])   ||
            isset($s['HTTP_X_HUAWEI_USERID'])           ||
            isset($s['HTTP_UA_OS'])                     || // Reported by Windows Smartphones.
            isset($s['HTTP_X_MOBILE_GATEWAY'])          || // Reported by Verizon, Vodafone proxy system.
            isset($s['HTTP_X_ATT_DEVICEID'])            || // Seend this on HTC Sensation. @ref: SensationXE_Beats_Z715e
            //HTTP_X_NETWORK_TYPE = WIFI
            ( isset($s['HTTP_UA_CPU']) &&
                    $s['HTTP_UA_CPU'] == 'ARM'          // Seen this on a HTC.
            )
        ) {
            return true;
        }
        return false;
    }
public function isMobile()
    {
        $s = $this->server;
        if (
            isset($s['HTTP_ACCEPT']) &&
                (strpos($s['HTTP_ACCEPT'], 'application/x-obml2d') !== false || // Opera Mini; @reference: http://dev.opera.com/articles/view/opera-binary-markup-language/
                 strpos($s['HTTP_ACCEPT'], 'application/vnd.rim.html') !== false || // BlackBerry devices.
                 strpos($s['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false ||
                 strpos($s['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false) ||
            isset($s['HTTP_X_WAP_PROFILE'])             ||
            isset($s['HTTP_X_WAP_CLIENTID'])            ||
            isset($s['HTTP_WAP_CONNECTION'])            ||
            isset($s['HTTP_PROFILE'])                   ||
            isset($s['HTTP_X_OPERAMINI_PHONE_UA'])      || // Reported by Nokia devices (eg. C3)
            isset($s['HTTP_X_NOKIA_IPADDRESS'])         ||
            isset($s['HTTP_X_NOKIA_GATEWAY_ID'])        ||
            isset($s['HTTP_X_ORANGE_ID'])               ||
            isset($s['HTTP_X_VODAFONE_3GPDPCONTEXT'])   ||
            isset($s['HTTP_X_HUAWEI_USERID'])           ||
            isset($s['HTTP_UA_OS'])                     || // Reported by Windows Smartphones.
            isset($s['HTTP_X_MOBILE_GATEWAY'])          || // Reported by Verizon, Vodafone proxy system.
            isset($s['HTTP_X_ATT_DEVICEID'])            || // Seend this on HTC Sensation. @ref: SensationXE_Beats_Z715e
            //HTTP_X_NETWORK_TYPE = WIFI
            ( isset($s['HTTP_UA_CPU']) &&
                    $s['HTTP_UA_CPU'] == 'ARM'          // Seen this on a HTC.
            )
        ) {
            return true;
        }
        return false;
    }
public function isMobile ( ) { $ s = $ this -> server ; if ( isset ( $ s [ 'HTTP_ACCEPT' ] ) && ( strpos ( $ s [ 'HTTP_ACCEPT' ] , 'application/x-obml2d' ) !== false || // Opera Mini; @reference: http://dev.opera.com/articles/view/opera-binary-markup-language/ strpos ( $ s [ 'HTTP_ACCEPT' ] , 'application/vnd.rim.html' ) !== false || // BlackBerry devices. strpos ( $ s [ 'HTTP_ACCEPT' ] , 'text/vnd.wap.wml' ) !== false || strpos ( $ s [ 'HTTP_ACCEPT' ] , 'application/vnd.wap.xhtml+xml' ) !== false ) || isset ( $ s [ 'HTTP_X_WAP_PROFILE' ] ) || isset ( $ s [ 'HTTP_X_WAP_CLIENTID' ] ) || isset ( $ s [ 'HTTP_WAP_CONNECTION' ] ) || isset ( $ s [ 'HTTP_PROFILE' ] ) || isset ( $ s [ 'HTTP_X_OPERAMINI_PHONE_UA' ] ) || // Reported by Nokia devices (eg. C3) isset ( $ s [ 'HTTP_X_NOKIA_IPADDRESS' ] ) || isset ( $ s [ 'HTTP_X_NOKIA_GATEWAY_ID' ] ) || isset ( $ s [ 'HTTP_X_ORANGE_ID' ] ) || isset ( $ s [ 'HTTP_X_VODAFONE_3GPDPCONTEXT' ] ) || isset ( $ s [ 'HTTP_X_HUAWEI_USERID' ] ) || isset ( $ s [ 'HTTP_UA_OS' ] ) || // Reported by Windows Smartphones. isset ( $ s [ 'HTTP_X_MOBILE_GATEWAY' ] ) || // Reported by Verizon, Vodafone proxy system. isset ( $ s [ 'HTTP_X_ATT_DEVICEID' ] ) || // Seend this on HTC Sensation. @ref: SensationXE_Beats_Z715e //HTTP_X_NETWORK_TYPE = WIFI ( isset ( $ s [ 'HTTP_UA_CPU' ] ) && $ s [ 'HTTP_UA_CPU' ] == 'ARM' // Seen this on a HTC. ) ) { return true ; } return false ; }
Check if the device is mobile

@link https://github.com/serbanghita/Mobile-Detect
@license MIT License https://github.com/serbanghita/Mobile-Detect/blob/master/LICENSE.txt
@return bool
Check if the device is mobile