解析用户代理字符串的代码? [英] Code to parse user agent string?
本文介绍了解析用户代理字符串的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
奇怪的是,我无法在任何可以对用户代理字符串进行智能分析的地方找到良好的PHP函数?现在用Google搜索了大约20分钟.
As strange as I find this, I have not been able to find a good PHP function anywhere which will do an intelligent parse of a user agent string? Googled it for about 20 minutes now.
我已经有了字符串,我只需要将其切碎并至少给我浏览器/ver/os的东西.
I have the string already, I just need something that will chop it up and give me at least browser/ver/os.
在任何地方都知道一个好的摘要吗?
Know of a good snippet anywhere?
推荐答案
get_browser()
函数在PHP中已经存在了很长一段时间.
The get_browser()
function has been available in PHP for quite a long a time.
PHP手册是免费的,可以以各种格式下载并在线查看(带有注释)
The PHP manual is free, can be downloaded in various formats and viewed online (with comments)
这篇关于解析用户代理字符串的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文