note 41600 added to function.strpos

From: Date: Fri, 16 Apr 2004 07:46:25 +0000
Subject: note 41600 added to function.strpos
Groups: php.notes 
Request: Send a blank email to php-notes+get-68189@lists.php.net to get a copy of this message
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"; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.strpos.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41600 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41600&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41600&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#68189) next »