\Wms7_Browser

Description: Parses user-agent to get the names: browser, platform, operating system.

Summary

Methods
Properties
Constants
wms7_browser_data()
wms7_reset()
wms7_is_browser()
wms7_get_browser()
wms7_set_browser()
wms7_get_platform()
wms7_set_platform()
wms7_get_version()
wms7_set_version()
wms7_is_mobile()
wms7_is_robot()
wms7_get_user_agent()
wms7_set_user_agent()
wms7_is_chrome_frame()
__toString()
No public properties found
BROWSER_UNKNOWN
VERSION_UNKNOWN
BROWSER_OPERA
BROWSER_OPERA_MINI
BROWSER_WEBTV
BROWSER_IE
BROWSER_POCKET_IE
BROWSER_KONQUEROR
BROWSER_ICAB
BROWSER_OMNIWEB
BROWSER_FIREBIRD
BROWSER_FIREFOX
BROWSER_ICEWEASEL
BROWSER_SHIRETOKO
BROWSER_MOZILLA
BROWSER_AMAYA
BROWSER_LYNX
BROWSER_SAFARI
BROWSER_IPHONE
BROWSER_IPOD
BROWSER_IPAD
BROWSER_CHROME
BROWSER_ANDROID
BROWSER_IEMOBILE
BROWSER_WEB_OS
BROWSER_BLACKBERRY
BROWSER_ICECAT
BROWSER_NOKIA_S60
BROWSER_NOKIA
BROWSER_MSN
BROWSER_NETSCAPE_NAVIGATOR
BROWSER_GALEON
BROWSER_NETPOSITIVE
BROWSER_PHOENIX
BROWSER_YANDEXBOT
BROWSER_RAMBLERBOT
BROWSER_MAILRUBOT
BROWSER_MSNBOT
BROWSER_GOOGLEBOT
BROWSER_SLURP
BROWSER_BINGBOT
BROWSER_VIRUSDIEBOT
BROWSER_CRAWLERBOT
BROWSER_QWANTIFYBOT
BROWSER_TWITTERBOT
PLATFORM_UNKNOWN
PLATFORM_WINDOWS
PLATFORM_WINDOWS_10
PLATFORM_WINDOWS_8_1
PLATFORM_WINDOWS_8
PLATFORM_WINDOWS_7
PLATFORM_WINDOWS_2K
PLATFORM_WINDOWS_XP
PLATFORM_WINDOWS_98
PLATFORM_WINDOWS_95
PLATFORM_WINDOWS_CE
PLATFORM_APPLE
PLATFORM_LINUX
PLATFORM_OS2
PLATFORM_BEOS
PLATFORM_IPHONE
PLATFORM_IPOD
PLATFORM_IPAD
PLATFORM_BLACKBERRY
PLATFORM_NOKIA
PLATFORM_FREEBSD
PLATFORM_OPENBSD
PLATFORM_NETBSD
PLATFORM_SUNOS
PLATFORM_OPENSOLARIS
PLATFORM_ANDROID
OPERATING_SYSTEM_UNKNOWN
wms7_set_mobile()
wms7_set_robot()
wms7_determine()
wms7_check_browser()
wms7_check_browser_blackberry()
wms7_check_browser_mailrubot()
wms7_check_browser_ramblerbot()
wms7_check_browser_yandexbot()
wms7_check_browser_twitterbot()
wms7_check_browser_qwantifybot()
wms7_check_browser_googlebot()
wms7_check_browser_msnbot()
wms7_check_browser_bingbot()
wms7_check_browser_slurp()
wms7_check_browser_virusdiebot()
wms7_check_browser_crawlerbot()
wms7_check_browser_internetexplorer()
wms7_check_browser_opera()
wms7_check_browser_chrome()
wms7_check_browser_webtv()
wms7_check_browser_positive()
wms7_check_browser_galeon()
wms7_check_browser_konqueror()
wms7_check_browser_icab()
wms7_check_browser_omniweb()
wms7_check_browser_phoenix()
wms7_check_browser_firebird()
wms7_check_browser_netscapenavigator9plus()
wms7_check_browser_shiretoko()
wms7_check_browser_icecat()
wms7_check_browser_nokia()
wms7_check_browser_firefox()
wms7_check_browser_iceweasel()
wms7_check_browser_mozilla()
wms7_check_browser_lynx()
wms7_check_browser_amaya()
wms7_check_browser_safari()
wms7_check_browser_iphone()
wms7_check_browser_ipad()
wms7_check_browser_ipod()
wms7_check_browser_android()
wms7_check_browser_iemobile()
wms7_check_browser_web_os()
wms7_check_platform()
No protected properties found
N/A
No private methods found
$_agent
$_browser_name
$_version
$_platform
$_os
$_is_mobile
$_is_robot
N/A

Constants

BROWSER_UNKNOWN

BROWSER_UNKNOWN = 'unknown'

VERSION_UNKNOWN

VERSION_UNKNOWN = 'unknown'

BROWSER_OPERA

BROWSER_OPERA = 'Opera'

BROWSER_OPERA_MINI

BROWSER_OPERA_MINI = 'Opera Mini'

BROWSER_WEBTV

BROWSER_WEBTV = 'WebTV'

BROWSER_IE

BROWSER_IE = 'Internet Explorer'

BROWSER_POCKET_IE

BROWSER_POCKET_IE = 'Pocket Internet Explorer'

BROWSER_KONQUEROR

BROWSER_KONQUEROR = 'Konqueror'

BROWSER_ICAB

BROWSER_ICAB = 'iCab'

BROWSER_OMNIWEB

BROWSER_OMNIWEB = 'OmniWeb'

BROWSER_FIREBIRD

BROWSER_FIREBIRD = 'Firebird'

BROWSER_FIREFOX

BROWSER_FIREFOX = 'Firefox'

BROWSER_ICEWEASEL

BROWSER_ICEWEASEL = 'Iceweasel'

BROWSER_SHIRETOKO

BROWSER_SHIRETOKO = 'Shiretoko'

BROWSER_MOZILLA

BROWSER_MOZILLA = 'Mozilla'

BROWSER_AMAYA

BROWSER_AMAYA = 'Amaya'

BROWSER_LYNX

BROWSER_LYNX = 'Lynx'

BROWSER_SAFARI

BROWSER_SAFARI = 'Safari'

BROWSER_IPHONE

BROWSER_IPHONE = 'iPhone'

BROWSER_IPOD

BROWSER_IPOD = 'iPod'

BROWSER_IPAD

BROWSER_IPAD = 'iPad'

BROWSER_CHROME

BROWSER_CHROME = 'Chrome'

BROWSER_ANDROID

BROWSER_ANDROID = 'Android'

BROWSER_IEMOBILE

BROWSER_IEMOBILE = 'IEMobile'

BROWSER_WEB_OS

BROWSER_WEB_OS = 'WebOS'

BROWSER_BLACKBERRY

BROWSER_BLACKBERRY = 'BlackBerry'

BROWSER_ICECAT

BROWSER_ICECAT = 'IceCat'

BROWSER_NOKIA_S60

BROWSER_NOKIA_S60 = 'Nokia S60 OSS Browser'

BROWSER_NOKIA

BROWSER_NOKIA = 'Nokia Browser'

BROWSER_MSN

BROWSER_MSN = 'MSN Browser'

BROWSER_NETSCAPE_NAVIGATOR

BROWSER_NETSCAPE_NAVIGATOR = 'Netscape Navigator'

BROWSER_GALEON

BROWSER_GALEON = 'Galeon'

BROWSER_NETPOSITIVE

BROWSER_NETPOSITIVE = 'NetPositive'

BROWSER_PHOENIX

BROWSER_PHOENIX = 'Phoenix'

BROWSER_YANDEXBOT

BROWSER_YANDEXBOT = 'YandexBot'

BROWSER_RAMBLERBOT

BROWSER_RAMBLERBOT = 'RamblerBot'

BROWSER_MAILRUBOT

BROWSER_MAILRUBOT = 'MailRuBot'

BROWSER_MSNBOT

BROWSER_MSNBOT = 'MSN Bot'

BROWSER_GOOGLEBOT

BROWSER_GOOGLEBOT = 'GoogleBot'

BROWSER_SLURP

BROWSER_SLURP = 'Yahoo! Slurp'

BROWSER_BINGBOT

BROWSER_BINGBOT = 'BingBot'

BROWSER_VIRUSDIEBOT

BROWSER_VIRUSDIEBOT = 'VirusDieBot'

BROWSER_CRAWLERBOT

BROWSER_CRAWLERBOT = 'CrawlerBot'

BROWSER_QWANTIFYBOT

BROWSER_QWANTIFYBOT = 'QwantifyBot'

BROWSER_TWITTERBOT

BROWSER_TWITTERBOT = 'TwitterBot'

PLATFORM_UNKNOWN

PLATFORM_UNKNOWN = 'unknown'

PLATFORM_WINDOWS

PLATFORM_WINDOWS = 'Windows'

PLATFORM_WINDOWS_10

PLATFORM_WINDOWS_10 = 'Windows 10'

PLATFORM_WINDOWS_8_1

PLATFORM_WINDOWS_8_1 = 'Windows 8.1'

PLATFORM_WINDOWS_8

PLATFORM_WINDOWS_8 = 'Windows 8'

PLATFORM_WINDOWS_7

PLATFORM_WINDOWS_7 = 'Windows 7'

PLATFORM_WINDOWS_2K

PLATFORM_WINDOWS_2K = 'Windows 2K'

PLATFORM_WINDOWS_XP

PLATFORM_WINDOWS_XP = 'Windows XP'

PLATFORM_WINDOWS_98

PLATFORM_WINDOWS_98 = 'Windows 98'

PLATFORM_WINDOWS_95

PLATFORM_WINDOWS_95 = 'Windows 95'

PLATFORM_WINDOWS_CE

PLATFORM_WINDOWS_CE = 'Windows CE'

PLATFORM_APPLE

PLATFORM_APPLE = 'Apple'

PLATFORM_LINUX

PLATFORM_LINUX = 'Linux'

PLATFORM_OS2

PLATFORM_OS2 = 'OS/2'

PLATFORM_BEOS

PLATFORM_BEOS = 'BeOS'

PLATFORM_IPHONE

PLATFORM_IPHONE = 'iPhone'

PLATFORM_IPOD

PLATFORM_IPOD = 'iPod'

PLATFORM_IPAD

PLATFORM_IPAD = 'iPad'

PLATFORM_BLACKBERRY

PLATFORM_BLACKBERRY = 'BlackBerry'

PLATFORM_NOKIA

PLATFORM_NOKIA = 'Nokia'

PLATFORM_FREEBSD

PLATFORM_FREEBSD = 'FreeBSD'

PLATFORM_OPENBSD

PLATFORM_OPENBSD = 'OpenBSD'

PLATFORM_NETBSD

PLATFORM_NETBSD = 'NetBSD'

PLATFORM_SUNOS

PLATFORM_SUNOS = 'SunOS'

PLATFORM_OPENSOLARIS

PLATFORM_OPENSOLARIS = 'OpenSolaris'

PLATFORM_ANDROID

PLATFORM_ANDROID = 'Android'

OPERATING_SYSTEM_UNKNOWN

OPERATING_SYSTEM_UNKNOWN = 'unknown'

Properties

$_agent

$_agent : string

Internal variable $_agent.

Type

string

$_browser_name

$_browser_name : string

Internal variable $_browser_name.

Type

string

$_version

$_version : string

Internal variable $_version.

Type

string

$_platform

$_platform : string

Internal variable $_platform.

Type

string

$_os

$_os : string

Internal variable $_os.

Type

string

$_is_mobile

$_is_mobile : boolean

Internal variable $_is_mobile.

Type

boolean

$_is_robot

$_is_robot : boolean

Internal variable $_is_robot.

Type

boolean

Methods

wms7_browser_data()

wms7_browser_data(string  $user_agent = '') 

Set user agent.

Parameters

string $user_agent

Data of user agent.

wms7_reset()

wms7_reset() 

Reset all properties.

wms7_is_browser()

wms7_is_browser(string  $browser_name) : True

Check to see if the specific browser is valid.

Parameters

string $browser_name

The name of the Browser.

Returns

True —

if the browser is the specified browser

wms7_get_browser()

wms7_get_browser() : string

The name of the browser. All return types are from the class contants.

Returns

string —

Name of the browser

wms7_set_browser()

wms7_set_browser(string  $browser) 

Set the name of the browser.

Parameters

string $browser

The name of the Browser.

wms7_get_platform()

wms7_get_platform() : string

The name of the platform. All return types are from the class contants.

Returns

string —

Name of the browser

wms7_set_platform()

wms7_set_platform(string  $platform) 

Set the name of the platform.

Parameters

string $platform

The name of the Platform.

wms7_get_version()

wms7_get_version() : string

The version of the browser.

Returns

string —

Version of the browser (will only contain alpha-numeric characters and a period)

wms7_set_version()

wms7_set_version(string  $version) 

Set the version of the browser.

Parameters

string $version

The version of the Browser.

wms7_is_mobile()

wms7_is_mobile() : boolean

Is the browser from a mobile device?

Returns

boolean —

True if the browser is from a mobile device otherwise false

wms7_is_robot()

wms7_is_robot() : boolean

Is the browser from a robot (ex Slurp,GoogleBot)?

Returns

boolean —

True if the browser is from a robot otherwise false

wms7_get_user_agent()

wms7_get_user_agent() : string

Get the user agent value in use to determine the browser.

Returns

string —

The user agent from the HTTP header

wms7_set_user_agent()

wms7_set_user_agent(string  $agent_string) 

Set the user agent value (the construction will use the HTTP header value - this will overwrite it).

Parameters

string $agent_string

The value for the User Agent.

wms7_is_chrome_frame()

wms7_is_chrome_frame() : boolean

Used to determine if the browser is actually "chromeframe"

Returns

boolean —

True if the browser is using chromeframe

__toString()

__toString() : string

Returns a formatted string with a summary of the details of the browser.

Returns

string —

formatted string with a summary of the browser

wms7_set_mobile()

wms7_set_mobile(boolean  $value = true) 

Set the Browser to be mobile

Parameters

boolean $value

is the browser a mobile browser or not.

wms7_set_robot()

wms7_set_robot(boolean  $value = true) 

Set the Browser to be a robot.

Parameters

boolean $value

is the browser a robot or not.

wms7_determine()

wms7_determine() 

Protected routine to calculate and determine what the browser is in use (including platform).

wms7_check_browser()

wms7_check_browser() : boolean

Protected procedure for determining the type of browser (about 40 checks for belonging to the type of browser):

Special Notes:
(1) Opera must be checked before FireFox due to the odd. User agents used in some older versions of Opera.
(2) WebTV is strapped onto Internet Explorer so we must. Check for WebTV before IE.
(3) (deprecated) Galeon is based on Firefox and needs to be. Tested before Firefox is tested.
(4) OmniWeb is based on Safari so OmniWeb check must occur. bBefore Safari.
(5) Netscape 9+ is based on Firefox so Netscape checks. Before FireFox are necessary.

Returns

boolean —

True if the browser was detected otherwise false

wms7_check_browser_blackberry()

wms7_check_browser_blackberry() : boolean

Determine if the user is using a BlackBerry (last updated 1.7)

Returns

boolean —

True if the browser is the BlackBerry browser otherwise false

wms7_check_browser_mailrubot()

wms7_check_browser_mailrubot() : boolean

Determine if the browser is the MailRuBot or not

Returns

boolean —

True if the browser is the MailRuBot otherwise false

wms7_check_browser_ramblerbot()

wms7_check_browser_ramblerbot() : boolean

Determine if the browser is the RamblerBot or not

Returns

boolean —

True if the browser is the RamblerBot otherwise false

wms7_check_browser_yandexbot()

wms7_check_browser_yandexbot() : boolean

Determine if the browser is the YandexBot or not

Returns

boolean —

True if the browser is the YandexBot otherwise false

wms7_check_browser_twitterbot()

wms7_check_browser_twitterbot() : boolean

Determine if the browser is the Twitter or not

Returns

boolean —

True if the browser is the Twitter otherwise false

wms7_check_browser_qwantifybot()

wms7_check_browser_qwantifybot() : boolean

Determine if the browser is the Qwantify or not

Returns

boolean —

True if the browser is the Qwantify otherwise false

wms7_check_browser_googlebot()

wms7_check_browser_googlebot() : boolean

Determine if the browser is the GoogleBot or not (last updated 1.7)

Returns

boolean —

True if the browser is the GoogletBot otherwise false

wms7_check_browser_msnbot()

wms7_check_browser_msnbot() : boolean

Determine if the browser is the MSNBot or not (last updated 1.9)

Returns

boolean —

True if the browser is the MSNBot otherwise false

wms7_check_browser_bingbot()

wms7_check_browser_bingbot() : boolean

Determine if the browser is the BingBot or not (last updated 1.9)

Returns

boolean —

True if the browser is the BingBot otherwise false

wms7_check_browser_slurp()

wms7_check_browser_slurp() : boolean

Determine if the browser is the Yahoo! Slurp Robot or not (last updated 1.7)

Returns

boolean —

True if the browser is the Yahoo! Slurp Robot otherwise false

wms7_check_browser_virusdiebot()

wms7_check_browser_virusdiebot() : boolean

Determine if the browser is the VirusDieBot or not

Returns

boolean —

True if the browser is the VirusDieBot otherwise false

wms7_check_browser_crawlerbot()

wms7_check_browser_crawlerbot() : boolean

Determine if the browser is the CrawlerBot or not

Returns

boolean —

True if the browser is the CrawlerBot otherwise false

wms7_check_browser_internetexplorer()

wms7_check_browser_internetexplorer() : boolean

Determine if the browser is Internet Explorer or not (last updated 1.7)

Returns

boolean —

True if the browser is Internet Explorer otherwise false

wms7_check_browser_opera()

wms7_check_browser_opera() : boolean

Determine if the browser is Opera or not (last updated 1.7)

Returns

boolean —

True if the browser is Opera otherwise false

wms7_check_browser_chrome()

wms7_check_browser_chrome() : boolean

Determine if the browser is Chrome or not (last updated 1.7)

Returns

boolean —

True if the browser is Chrome otherwise false

wms7_check_browser_webtv()

wms7_check_browser_webtv() : boolean

Determine if the browser is WebTv or not (last updated 1.7)

Returns

boolean —

True if the browser is WebTv otherwise false

wms7_check_browser_positive()

wms7_check_browser_positive() : boolean

Determine if the browser is NetPositive or not (last updated 1.7)

Returns

boolean —

True if the browser is NetPositive otherwise false

wms7_check_browser_galeon()

wms7_check_browser_galeon() : boolean

Determine if the browser is Galeon or not (last updated 1.7)

Returns

boolean —

True if the browser is Galeon otherwise false

wms7_check_browser_konqueror()

wms7_check_browser_konqueror() : boolean

Determine if the browser is Konqueror or not (last updated 1.7)

Returns

boolean —

True if the browser is Konqueror otherwise false

wms7_check_browser_icab()

wms7_check_browser_icab() : boolean

Determine if the browser is iCab or not (last updated 1.7)

Returns

boolean —

True if the browser is iCab otherwise false

wms7_check_browser_omniweb()

wms7_check_browser_omniweb() : boolean

Determine if the browser is OmniWeb or not (last updated 1.7)

Returns

boolean —

True if the browser is OmniWeb otherwise false

wms7_check_browser_phoenix()

wms7_check_browser_phoenix() : boolean

Determine if the browser is Phoenix or not (last updated 1.7)

Returns

boolean —

True if the browser is Phoenix otherwise false

wms7_check_browser_firebird()

wms7_check_browser_firebird() : boolean

Determine if the browser is Firebird or not (last updated 1.7)

Returns

boolean —

True if the browser is Firebird otherwise false

wms7_check_browser_netscapenavigator9plus()

wms7_check_browser_netscapenavigator9plus() : boolean

Determine if the browser is Netscape Navigator 9+ or not (last updated 1.7) NOTE: (http://browser.netscape.com/ - Official support ended on March 1st, 2008)

Returns

boolean —

True if the browser is Netscape Navigator 9+ otherwise false

wms7_check_browser_shiretoko()

wms7_check_browser_shiretoko() : boolean

Determine if the browser is Shiretoko or not (https://wiki.mozilla.org/Projects/shiretoko) (last updated 1.7)

Returns

boolean —

True if the browser is Shiretoko otherwise false

wms7_check_browser_icecat()

wms7_check_browser_icecat() : boolean

Determine if the browser is Ice Cat or not (http://en.wikipedia.org/wiki/GNU_IceCat) (last updated 1.7)

Returns

boolean —

True if the browser is Ice Cat otherwise false

wms7_check_browser_nokia()

wms7_check_browser_nokia() : boolean

Determine if the browser is Nokia or not (last updated 1.7)

Returns

boolean —

True if the browser is Nokia otherwise false

wms7_check_browser_firefox()

wms7_check_browser_firefox() : boolean

Determine if the browser is Firefox or not (last updated 1.7)

Returns

boolean —

True if the browser is Firefox otherwise false

wms7_check_browser_iceweasel()

wms7_check_browser_iceweasel() : boolean

Determine if the browser is Firefox or not (last updated 1.7)

Returns

boolean —

True if the browser is Firefox otherwise false

wms7_check_browser_mozilla()

wms7_check_browser_mozilla() : boolean

Determine if the browser is Mozilla or not (last updated 1.7)

Returns

boolean —

True if the browser is Mozilla otherwise false

wms7_check_browser_lynx()

wms7_check_browser_lynx() : boolean

Determine if the browser is Lynx or not (last updated 1.7)

Returns

boolean —

True if the browser is Lynx otherwise false

wms7_check_browser_amaya()

wms7_check_browser_amaya() : boolean

Determine if the browser is Amaya or not (last updated 1.7)

Returns

boolean —

True if the browser is Amaya otherwise false

wms7_check_browser_safari()

wms7_check_browser_safari() : boolean

Determine if the browser is Safari or not (last updated 1.7)

Returns

boolean —

True if the browser is Safari otherwise false

wms7_check_browser_iphone()

wms7_check_browser_iphone() : boolean

Determine if the browser is iPhone or not (last updated 1.7)

Returns

boolean —

True if the browser is iPhone otherwise false

wms7_check_browser_ipad()

wms7_check_browser_ipad() : boolean

Determine if the browser is iPod or not (last updated 1.7)

Returns

boolean —

True if the browser is iPad otherwise false

wms7_check_browser_ipod()

wms7_check_browser_ipod() : boolean

Determine if the browser is iPod or not (last updated 1.7)

Returns

boolean —

True if the browser is iPod otherwise false

wms7_check_browser_android()

wms7_check_browser_android() : boolean

Determine if the browser is Android or not (last updated 1.7)

Returns

boolean —

True if the browser is Android otherwise false

wms7_check_browser_iemobile()

wms7_check_browser_iemobile() : boolean

Determine if the browser is IEMobile or not (add new function)

Returns

boolean —

True if the browser is IEMobile otherwise false

wms7_check_browser_web_os()

wms7_check_browser_web_os() : boolean

Determine if the browser is webOS or not (add new function)

Returns

boolean —

True if the browser is webOS otherwise false

wms7_check_platform()

wms7_check_platform() 

Determine the user's platform (last updated 1.7)