get_browser() still doesn't work
| From: | php at home dot uh dot nu | Date: | Wed, 10 May 2000 20:20:41 +0000 |
| Subject: | get_browser() still doesn't work | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-14781@lists.php.net to get a copy of this message | ||
Howdy folks,
I'm still trying to get get_browser() to work. I'm trying to call it
from an IE 5.0 browser, and I get nothing back from get_browser().
I have the latest browscap.ini file and have pointed to it in my php.ini
file, and still nothing :( HTTP_USER_AGENT does output the correct info.
Here is my test script
<?php
function list_array ($array)
{
while (list ($key, $value) = each ($array))
{
$str .= "<b>$key:</b> $value<br>\n";
}
return $str;
}
echo "$HTTP_USER_AGENT<hr>\n";
$browser = get_browser($HTTP_USER_AGENT);
echo list_array ((array) $browser);
echo "browser = $browser->browser<br>\n";
?>
my output
Mozilla/4.0 (compatible; MSIE 5.0; Windows 98)
0:
browser=
I looked in the browscap file and there is an entry for that HTTP_USER_AGENT.
get_browser() just isn't working.
Any ideas?
Thanks
Walt