get_browser() still doesn't work
| From: | php at home dot uh dot nu | Date: | Wed, 10 May 2000 18:52:09 +0000 |
| Subject: | get_browser() still doesn't work | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-14775@lists.php.net to get a copy of this message | ||
Hi folks,
get_browser() still doesn't work in RC2. I'm hitting a test script with IE 5.0
and I get nothing in the $browser object/array. I have the latest and
greatest browsecap.ini file and my php.ini file points to it. I checked
the HTTP_USER_AGENT output and there is a match for it in the browsecap.ini
file, but get_browser still fails. Any ideas?
<?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";
?>
Walt