Using PHP 4.1.2.
Here is my HTTP_USER_AGENT...
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0rc1) Gecko/20020417
And here is the code that returns nothing...
<?php
function inAgent($agent) {
$notAgent = (strpos($HTTP_SERVER_VARS["HTTP_USER_AGENT"],$agent) === false);
return !$notAgent;
}
if (inAgent('Mozilla')) {
echo "Mozilla ";
}
?>
Can anyone tell me where I'm screwing up?