note 15495 added to function.get-browser
| From: | corky6921 at NOSPAMPLEASE-yahoo dot com | Date: | Thu, 13 Sep 2001 23:11:10 +0000 |
| Subject: | note 15495 added to function.get-browser | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17998@lists.php.net to get a copy of this message | ||
I had to test for Windows because I was setting a file to download to the client computer from a
UNIX server, and the carriage returns are different. Here is a tiny little string that works (tested
on Win/IE, Win/Netscape, Solaris/IE and Solaris/Netscape.)
if(strstr(getenv('HTTP_USER_AGENT'), 'Win')) {
$os = "Windows";
}
else {
$os = "Not Windows";
};
http://www.php.net/manual/en/function.get-browser.php