从用户代理检测到什么设备(移动设备)的php脚本? [英] php script that detect from user agent what is the device (mobile)?

查看:77
本文介绍了从用户代理检测到什么设备(移动设备)的php脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写一个PHP脚本,该脚本从标题中的用户代理返回设备。

I am try to write a php script that return the device from the user agent in the header.

我看到的问题并不容易做到正则表达式,因为设备之间的差异(我错了吗?)

the problem that i see that is not simple to do a regular expression, because the different between the device (am i wrong?)

所以我要根据用户代理更新移动设备列表

so i want an updated list of mobile device according to the user agent

我找到了这个列表:手机用户代理列表

我试图找到一个更新的XML /提要,我可以接受所有种类

I try to find an updated xml / feed that i can take all the kinds

谢谢。

推荐答案

之后很多搜索,我认为简单的方法是使用
a网络服务

after alot of search i think the simple way is to use a web service

这意味着没有下载,没有安装,没有麻烦...只是简单!

http://www.wurflws .com /

编辑:

Web服务现在不可用,
i建议使用 http://deviceatlas.com/ http://51degrees.mobi/ (商业),或者如果您查看开源,请查看:
最佳开源WURFL替代方案

The web service is not available now, i recommend to use http://deviceatlas.com/ or http://51degrees.mobi/ (commercial) or if you look on open source look on : Best Open Source WURFL alternative

这篇关于从用户代理检测到什么设备(移动设备)的php脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆