note 41600 deleted from function.strpos by irchtml
| From: | irchtml@php.net | Date: | Fri, 16 Apr 2004 07:47:04 +0000 |
| Subject: | note 41600 deleted from function.strpos by irchtml | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-68190@lists.php.net to get a copy of this message | ||
Note Submitter: nicolaennio at libero dot it
----
this is an if cascade that finds out the client browser:
<?php
$agent=$HTTP_USER_AGENT;
$wapalizer="Wapalizer";
$mozilla="Mozilla/5.0";
$explorer="Mozilla/4.0";
$netscape="Mozilla/4.79";
if (strpos($agent,$mozilla) === false)
{
echo " this is not mozilla";
}
else
{
echo " this is mozilla";
}
if (strpos($agent,$explorer) === false)
{
echo "this is not explorer";
}
else
{
echo "this is explorer";
}
if (strpos($agent,$netscape) === false)
{
echo " this is not netscape";
}
else
{
echo "this is netscape";
}
if (strpos($agent,$wapalizer) === false)
{
echo "this is a wapalizer";
}
else
{
echo "this is not a wapalizer";
}
?>