I am trying to get the browser and platform names from visitors in PHP. I can't use the get_browser method because its not supported on my server. I have found this:
It seems to do what i require. However i'm having trouble getting the information from the array. Heres my code:
// Loads the class
// Creates a new Browscap object (loads or creates the cache)
$bc = new Browscap('includes/Browsca
// Gets information about the current browser's user agent
$current_browser = $bc->getBrowser();
// Output the result
$browser = $current_browser['browser'
$platform = $current_browser['platform
echo $browser . "<br />" . $platform;
This just prints nothing. Where am i going wrong?