RE: [PHP] How to detect the host (window or Linux)?
| From: | Richard Lynch | Date: | Wed, 24 Sep 2008 13:42:30 +0000 |
| Subject: | RE: [PHP] How to detect the host (window or Linux)? | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-280845@lists.php.net to get a copy of this message | ||
> Thanks Thodoris and Anderson. Sorry for not clear about the question.
> I mean to detect the OS in Host system where the browser is located,
> not the SERVER OS.
It's really none of your business what OS I'm running :-v
You may be able to make an educated guess from the HTTP headers in $_SERVER.
var_dump($_SERVER);
and see what you get.
But you can't RELY on them, as some users will intentionally mask/alter that..
If your website depends on the visitor's OS for anything other than trivial behaviour,
you're in real trouble.
_______________________________________________________
The information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial use of the individual or entity to which it is
addressed and may contain information that is propri-
etary and confidential. If you are not the intended
recipient of this message you are hereby notified that
any review, dissemination, distribution or copying of
this message is strictly prohibited. This communica-
tion is for information purposes only and should not
be regarded as an offer to sell or as a solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be secure or error-
free. P6070214