This question already has answers here:
What is the list of possible values for navigator.platform as of today? [closed]
(3 answers)
Closed 5 years ago.
How to find Windowow devices using Javascript or jquery
use 'navigator.platform' to check what platform you are using.
https://developer.mozilla.org/en-US/docs/Web/API/NavigatorID/platform
function isWindows() {
return navigator.platform.indexOf('Win') > -1
}
// Maybe Try this on android deveices
function isAndroid() {
return navigator.platform.indexOf('android') > -1
}
Related
This question already has answers here:
What is the use of the # symbol in PHP?
(11 answers)
Closed 7 years ago.
$block_header = #unpack('Sc_size/Su_size/Lchecksum', fread($this->fp, 8));
What does this mean ?
PHP Error Control Operators.
it avoids showing the error returned by the function. more info in the link:
http://www.php.net/manual/en/language.operators.errorcontrol.php
This question already has answers here:
PHP detect Internet Explorer that is below version 10
(3 answers)
Closed 8 years ago.
The question is, how to detect any IE version using PHP?
I seen PHP scripts that detect specific versions of IE, but I was unable to find a way to detect any version of IE. Thanks for your help.
<?php
function ae_detect_ie()
{
if (isset($_SERVER['HTTP_USER_AGENT']) &&
(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
return true;
else
return false;
}
?>
taken from : http://www.anyexample.com/programming/php/how_to_detect_internet_explorer_with_php.xml
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
What does it mean to start a PHP function with an ampersand?
hi
Why is it that some php functions have a '&' in their signature for example
function &getData()
It returns a reference to a variable.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
My frame is redirecting page !! How to stop it ?
Is there any code like that ?
Please help..Thanks
If you mean a code that detects if it's in a frame, and if so, change the target location?
if (parent.frames.length > 0) parent.location.href = location.href;
This question already has answers here:
What does it mean to start a PHP function with an ampersand?
(3 answers)
Closed 7 years ago.
I know & is used to create references.
But I wonder what having a & before a function name means:
function &DB($params = '', $active_record_override = FALSE) { // code }
It returns the result by reference. See the manual entry for it here.