I've learned a lot from the board here, but have come across a stumper...
I'm running PHP4 on an NT box running Netscape Enterprise Server. $HTTP_USER_AGENT didn't work for me, but $HTTP_SERVER_VARS["HTTP_USER_AGENT"] did on a simple test page.
When I tried to incorporate this into this function I borrowed from WebmasterBase...
function inAgent($agent) {
global $HTTP_USER_AGENT;
$notAgent = strpos($HTTP_USER_AGENT,$agent) === false;
return !$notAgent;
}
Then all I get when I load the .php is a blank HTML document with html and body tags???? -- even though there is a lot of html code elsewhere on the page.
If I remove the global line, then at least the page loads again, but it appears that the script does not run, as an echo $browser returns a blank line.