class Browser

Browser, Useragent Snippets

Constants

POST

GET

PUT

DELETE

Methods

__construct()

Constructor

array
getRequestInfo()

Get Request Info

int
getXelosAppVersion()

Checks if the request comes from the XELOS App and determines the version based on the user agent returns the major app version or 0 if the reques does not come from the APP

array
get_browser_info(array $agent = null)

Returns browser name and version info

string
get_browser_shortname()

Returns a human readable short string of the current browser of the user

string
get_hostname()

Returns the client hostname (DNS) if available

string
get_ip()

returns the client ip and checks therefor if user was forwarded by a proxy

array
get_long_info()

Get long Information about everything we can find out at this point

get_resolution()

Returns the browser resultion and device pixel ration / retine (dpr) if available The values are being detected in the frontend via JavaScript and passed as cookie. Therefore the first request to a XELOS system might not have the values ready

get_touch_status()

Returns if the browser device has_touch: The device is generally capable of interpreting touch inputs (e.g. Windows Tables with Touchscreen) use_touch: The user is currently using the device in touch mode. Use this value for best interface compatibility with hybrid devices (e.g. Windows Touch Laptop which is being used with a traditional mouse)

string
get_user_agent()

put your comment there.

string
get_version()

Returns numeric version of client

bool
isRequestMethod(string $method = Browser::GET)

Is current Request of given Method?

bool
isVUEBlobRequest()

Is the current request a blob request? Content requested in this call will be added to the iframe with src="blob:" and is slighty restricted: e.g. when origin-security is applied in JS content or forms are missing the action="" attribute

bool
is_android(bool|string $user_agent = false)

No description

bool
is_android_app(bool $user_agent = false)

Combines the check, whether the user is on the XELOS App on an Android device.

bool
is_chrome(bool|string $user_agent = false)

Returns TRUE of agent is Chrome

bool
is_device_ipad(bool|string $user_agent = false)

No description

bool
is_device_iphone(bool|string $user_agent = false)

No description

bool
is_device_ipod_touch(bool|string $user_agent = false)

No description

bool
is_firefox(string $user_agent = false)

Returns TRUE of agent is Firefox

is_hdpi_device()

Returns true if the DEVICE is a HighDPI / Retina Device

bool
is_ie(string $user_agent = false)

Returns TRUE of agent is Internet Explorer

bool
is_ios(bool|string $user_agent = false, bool|int $version = false)

put your comment there.

bool
is_ip_in_range(string $ip, string $range)

Check if a given ip is in a network

bool
is_mobile(bool|string $user_agent = false, bool $strict = false)

Is Mobile Device/Browser?

bool
is_mobile_safari(bool|string $user_agent = false)

mobile Safari for

bool
is_ms_office()

Checks for MS Office App Useragent

bool
is_ms_office_mobile()

Checks for MS Office Mobile App Useragent e.g. Microsoft Office Word/2.23.304 (iOS/12.1.4; Phone; de-DE; AppStore; Apple/iPhone10,6)

is_post_request()

No description

bool
is_safari_webapp(bool|string $user_agent = false)

No description

bool
is_unsupported_browser()

Checks if the current browser of the user is supported or not by this xelos version

bool
is_xdc(string $user_agent = false)

Returns TRUE of agent is xelos Desktop Connector Tool (xdc)

bool
is_xelos_app()

Checks for XELOS App Useragent

bool
is_xoi(string $user_agent = false)

Returns TRUE of agent is xelos Office Integration (XOI)

void
send_canonical_header(null $url = null, bool $overwrite = false)

Send Canonical HTTP Header

Details

at line 22
__construct()

Constructor

at line 543
array getRequestInfo()

Get Request Info

Return Value

array

at line 401
int getXelosAppVersion()

Checks if the request comes from the XELOS App and determines the version based on the user agent returns the major app version or 0 if the reques does not come from the APP

Return Value

int

major app version

at line 63
array get_browser_info(array $agent = null)

Returns browser name and version info

Parameters

array $agent

('browser'=>[NAME], 'version=>[VERSIOn])

Return Value

array

at line 154
string get_browser_shortname()

Returns a human readable short string of the current browser of the user

Return Value

string

at line 206
string get_hostname()

Returns the client hostname (DNS) if available

Return Value

string

at line 187
string get_ip()

returns the client ip and checks therefor if user was forwarded by a proxy

Return Value

string

ip

at line 171
array get_long_info()

Get long Information about everything we can find out at this point

Return Value

array

at line 113
get_resolution()

Returns the browser resultion and device pixel ration / retine (dpr) if available The values are being detected in the frontend via JavaScript and passed as cookie. Therefore the first request to a XELOS system might not have the values ready

at line 132
get_touch_status()

Returns if the browser device has_touch: The device is generally capable of interpreting touch inputs (e.g. Windows Tables with Touchscreen) use_touch: The user is currently using the device in touch mode. Use this value for best interface compatibility with hybrid devices (e.g. Windows Touch Laptop which is being used with a traditional mouse)

at line 31
string get_user_agent()

put your comment there.

..

Return Value

string

at line 40
string get_version()

Returns numeric version of client

Return Value

string

at line 225
bool isRequestMethod(string $method = Browser::GET)

Is current Request of given Method?

Parameters

string $method

Return Value

bool

at line 481
bool isVUEBlobRequest()

Is the current request a blob request? Content requested in this call will be added to the iframe with src="blob:" and is slighty restricted: e.g. when origin-security is applied in JS content or forms are missing the action="" attribute

Return Value

bool

at line 442
bool is_android(bool|string $user_agent = false)

No description

Parameters

bool|string $user_agent

custom user-agent. if boolean false, else use default global $_SERVER['HTTP_USER_AGENT']

Return Value

bool

at line 454
bool is_android_app(bool $user_agent = false)

Combines the check, whether the user is on the XELOS App on an Android device.

Parameters

bool $user_agent

Return Value

bool

at line 266
bool is_chrome(bool|string $user_agent = false)

Returns TRUE of agent is Chrome

Parameters

bool|string $user_agent

custom user-agent. if boolean false, else use default global $_SERVER['HTTP_USER_AGENT']

Return Value

bool

at line 361
bool is_device_ipad(bool|string $user_agent = false)

No description

Parameters

bool|string $user_agent

custom user-agent. if boolean false, else use default global $_SERVER['HTTP_USER_AGENT']

Return Value

bool

is this an Apple iOS Device/Browser?

at line 351
bool is_device_iphone(bool|string $user_agent = false)

No description

Parameters

bool|string $user_agent

custom user-agent. if boolean false, else use default global $_SERVER['HTTP_USER_AGENT']

Return Value

bool

is this an Apple iOS Device/Browser?

at line 370
bool is_device_ipod_touch(bool|string $user_agent = false)

No description

Parameters

bool|string $user_agent

custom user-agent. if boolean false, else use default global $_SERVER['HTTP_USER_AGENT']

Return Value

bool

is this an Apple iOS Device/Browser?

at line 255
bool is_firefox(string $user_agent = false)

Returns TRUE of agent is Firefox

Parameters

string $user_agent

custom user-agent. if boolean false, else use default global $_SERVER['HTTP_USER_AGENT']

Return Value

bool

at line 143
is_hdpi_device()

Returns true if the DEVICE is a HighDPI / Retina Device

at line 242
bool is_ie(string $user_agent = false)

Returns TRUE of agent is Internet Explorer

Parameters

string $user_agent

custom user-agent. if boolean false, else use default global $_SERVER['HTTP_USER_AGENT']

Return Value

bool

at line 334
bool is_ios(bool|string $user_agent = false, bool|int $version = false)

put your comment there.

..

Parameters

bool|string $user_agent

custom user-agent. if boolean false, else use default global $_SERVER['HTTP_USER_AGENT']

bool|int $version

iOS version number like 7 or 8

Return Value

bool

is this an Apple iOS Device/Browser?

at line 491
bool is_ip_in_range(string $ip, string $range)

Check if a given ip is in a network

Parameters

string $ip

IP to check in IPV4 format eg. 127.0.0.1

string $range

IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 and 127.0.0.* is accepted

Return Value

bool

true if the ip is in this range / false if not.

at line 279
bool is_mobile(bool|string $user_agent = false, bool $strict = false)

internal  param strict $is ? (includes also if mobile=1 from GPVars)
 

Is Mobile Device/Browser?

Parameters

bool|string $user_agent

custom user-agent. if boolean false, else use default global $_SERVER['HTTP_USER_AGENT']

bool $strict

Return Value

bool

true if mobile

at line 466
bool is_mobile_safari(bool|string $user_agent = false)

mobile Safari for

Parameters

bool|string $user_agent

custom user-agent. if boolean false, else use default global $_SERVER['HTTP_USER_AGENT']

Return Value

bool

at line 423
bool is_ms_office()

Checks for MS Office App Useragent

Return Value

bool

at line 432
bool is_ms_office_mobile()

Checks for MS Office Mobile App Useragent e.g. Microsoft Office Word/2.23.304 (iOS/12.1.4; Phone; de-DE; AppStore; Apple/iPhone10,6)

Return Value

bool

at line 210
is_post_request()

No description

at line 381
bool is_safari_webapp(bool|string $user_agent = false)

No description

Parameters

bool|string $user_agent

custom user-agent. if boolean false, else use default global $_SERVER['HTTP_USER_AGENT']

Return Value

bool

at line 48
bool is_unsupported_browser()

Checks if the current browser of the user is supported or not by this xelos version

Return Value

bool

at line 313
bool is_xdc(string $user_agent = false)

Returns TRUE of agent is xelos Desktop Connector Tool (xdc)

Parameters

string $user_agent

custom user-agent. if boolean false, else use default global $_SERVER['HTTP_USER_AGENT']

Return Value

bool

at line 391
bool is_xelos_app()

Checks for XELOS App Useragent

Return Value

bool

at line 322
bool is_xoi(string $user_agent = false)

Returns TRUE of agent is xelos Office Integration (XOI)

Parameters

string $user_agent

custom user-agent. if boolean false, else use default global $_SERVER['HTTP_USER_AGENT']

Return Value

bool

at line 522
void send_canonical_header(null $url = null, bool $overwrite = false)

Send Canonical HTTP Header

Parameters

null $url

Canonical URL (absoulte with http:// ), if no URL is supplied this URL will determined automatically

bool $overwrite

Should previously set headers be overriden? (Only possible if headers have not been sent yet)

Return Value

void