Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
$config
to MobileDetect constructor.autoInitOfHttpHeaders
configuration which is by default true
. This enabled the old behavior from 3.x
and 2.x
that allows automatic detection of HTTP headers and User Agent from $_SERVER.setHttpHeaders
work. It no longer falls back on $_SERVER
. The method still calls setUserAgent
in case HTTP_USER_AGENT
and friends are present.maximumUserAgentLength
to the $config
, by default the limit is 500
.Other
@deprecated
methodsDetection\MobileDetect