\MobileBrowserDetector
Helper class for detecting known mobile agents.
This is a flawed approach to begin with, since there's no reliable way
to detect "mobile" device characteristics through the user agent string.
CAUTION: Does NOT detect Windows 8 tablets, since there's no user-agent distinction between
tablets and desktops in Windows 8.
Synopsis
class MobileBrowserDetector
{
- // methods
- private static array mobile_index_list()
- public static void is_android()
- public static void is_iphone()
- public static void is_opera_mini()
- public static void is_blackberry()
- public static void is_palm()
- public static void is_windows()
- public static void is_win_phone()
- public static bool is_mobile()
- public static boolean is_tablet()
Methods
private
- mobile_index_list() — List of known mobiles, found in the HTTP_USER_AGENT variable
public
- is_android()
- is_blackberry()
- is_iphone()
- is_mobile() — Rough detection of "mobile" browsers based on their user agent strings.
- is_opera_mini()
- is_palm()
- is_tablet() — Rough detection of "tablet" user agents, based on their user agent string.
- is_win_phone()
- is_windows()