note 15496 deleted from function.strstr by spic

From: Date: Thu, 19 Sep 2002 21:06:34 +0000
Subject: note 15496 deleted from function.strstr by spic
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-36970@lists.php.net to get a copy of this message
This function can be very useful. For instance: 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 statement 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"; }; More like this @ the get_browser function page (including how to test for IE vs. Netscape, etc.)

« previous php.notes (#36970) next »