开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜