Good class to identify browser and OS
Is there any descent class that are capable to identify browser, its version and operating system?
I have tried default php function开发者_StackOverflow get_browser but results returned was wrong, it could not recognise non of my browsers (IE,Opera,Chrome,FF) except firefox but with wrong version.
Take a look at phpbrowscap: https://github.com/garetjax/phpbrowscap
Use it like this:
$bc = new Browscap('/path/to/temp/dir');
$current_browser = $bc->getBrowser();
echo "<pre>";
print_r($current_browser);
echo "</pre>";
Browscap consumes excessive ammounts of memory on the webserver.... not an option for me.
精彩评论