Browser
class Browser
Browser, Useragent Snippets
Constants
| POST |
|
| GET |
|
| PUT |
|
| DELETE |
|
Methods
Constructor
Get Request Info
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
Returns browser name and version info
Returns a human readable short string of the current browser of the user
Returns the client hostname (DNS) if available
returns the client ip and checks therefor if user was forwarded by a proxy
Get long Information about everything we can find out at this point
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
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)
put your comment there.
Returns numeric version of client
Check if client/browser matches a given set of networks/ip ranges
Is current Request of given Method?
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
Very similar to the BlobRequest, but iframe is not using blob binary
Checks if the browser is running on Android and is not the XELOS app.
Returns TRUE of agent is Chrome
No description
No description
No description
Returns TRUE of agent is Firefox
Returns true if the DEVICE is a HighDPI / Retina Device
Returns TRUE of agent is Internet Explorer
Returns true if it is an iOS browser and not the XELOS app.
Check if a given ip is in a network
Is Mobile Device/Browser?
mobile Safari for
Checks for MS Office App Useragent
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)
No description
No description
Checks if the current browser of the user is supported or not by this xelos version
Returns TRUE of agent is xelos Desktop Connector Tool (xdc)
Checks for XELOS App Useragent
Returns TRUE of agent is xelos Office Integration (XOI)
Remove a previously set cookie
Send X-Accel-Redirect Header for NGINX
Send Canonical HTTP Header
Set cookie using the correct global options (secure, httponly, samesite, domain)
Details
at line 23
__construct()
Constructor
at line 632
array
getRequestInfo()
Get Request Info
at line 471
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
at line 64
array
get_browser_info(string $agent = null)
Returns browser name and version info
at line 232
string
get_browser_shortname()
Returns a human readable short string of the current browser of the user
at line 285
string
get_hostname()
Returns the client hostname (DNS) if available
at line 265
string|null
get_ip()
returns the client ip and checks therefor if user was forwarded by a proxy
at line 249
array
get_long_info()
Get long Information about everything we can find out at this point
at line 191
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 210
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 32
string
get_user_agent()
put your comment there.
..
at line 41
string
get_version()
Returns numeric version of client
at line 591
bool
isMatchingNetmask(string ...$networks)
Check if client/browser matches a given set of networks/ip ranges
at line 304
bool
isRequestMethod(string $method = Browser::GET)
Is current Request of given Method?
at line 542
static bool
isVUEBlobRequest()
deprecated
deprecated
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
at line 551
static bool
isVUEFrameRequest()
Very similar to the BlobRequest, but iframe is not using blob binary
at line 514
bool
is_android(bool|string $user_agent = false)
Checks if the browser is running on Android and is not the XELOS app.
at line 345
bool
is_chrome(bool|string $user_agent = false)
Returns TRUE of agent is Chrome
at line 431
bool
is_device_ipad(bool|string $user_agent = false)
No description
at line 421
bool
is_device_iphone(bool|string $user_agent = false)
No description
at line 440
bool
is_device_ipod_touch(bool|string $user_agent = false)
No description
at line 334
bool
is_firefox(string $user_agent = false)
Returns TRUE of agent is Firefox
at line 221
is_hdpi_device()
Returns true if the DEVICE is a HighDPI / Retina Device
at line 321
bool
is_ie(string $user_agent = false)
Returns TRUE of agent is Internet Explorer
at line 412
bool
is_ios(bool|string $user_agent = false)
Returns true if it is an iOS browser and not the XELOS app.
at line 561
bool
is_ip_in_range(string $ip, string $range)
Check if a given ip is in a network
at line 358
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?
at line 526
bool
is_mobile_safari(bool|string $user_agent = false)
mobile Safari for
at line 493
bool
is_ms_office()
Checks for MS Office App Useragent
at line 502
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)
at line 289
is_post_request()
No description
at line 451
bool
is_safari_webapp(bool|string $user_agent = false)
No description
at line 49
bool
is_unsupported_browser()
Checks if the current browser of the user is supported or not by this xelos version
at line 392
bool
is_xdc(string $user_agent = false)
Returns TRUE of agent is xelos Desktop Connector Tool (xdc)
at line 461
bool
is_xelos_app()
Checks for XELOS App Useragent
at line 401
bool
is_xoi(string $user_agent = false)
Returns TRUE of agent is xelos Office Integration (XOI)
at line 673
static bool
removeCookie(string $name)
Remove a previously set cookie
at line 688
bool
sendXAccelRedirect(string $path_to_file)
Send X-Accel-Redirect Header for NGINX
at line 611
void
send_canonical_header(null $url = null, bool $overwrite = false)
Send Canonical HTTP Header
at line 651
static bool
setCookie(string $name, string $value = '', int $expires = 0)
Set cookie using the correct global options (secure, httponly, samesite, domain)