通过用户代理识别手机

发布于 2024-07-29 16:04:11 字数 65 浏览 6 评论 0原文

有没有一种好方法可以通过用户代理或类似的、易于访问的方法来识别手机或任何其他移动设备(可能受到有限数据计划的限制)?

Is there a good way to identify a cell phone or any other mobile device (which may be subject to a limited data plan) through the user agent or similar, easily accessible methods?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

夜巴黎 2024-08-05 16:04:11

是:WURFL,无线通用资源文件:“WURFL 是一个 XML 配置文件,其中包含有关许多移动设备的功能和特性的信息。”

Yes: WURFL, the Wireless Universal Resource File: "The WURFL is an XML configuration file which contains information about capabilities and features of many mobile devices."

半山落雨半山空 2024-08-05 16:04:11

您需要在用户代理中查找特定的浏览器和关键字,例如“Mobile”、“Skyfire”等。这应该是一种非常可靠的方法。 您想要在 Google 上搜索移动浏览器用户代理。 可能有人列了一个清单。

You'd want to look in the User Agent for specific browsers and keywords like 'Mobile', 'Skyfire', etc. That should be a pretty reliable way. You'd want to do a Google Search for Mobile Browser UserAgents. Someone probably has made a list.

谁的年少不轻狂 2024-08-05 16:04:11

我认为您无法确定在许多情况下使用的确切电话,因为许多电话共享相同的用户代理字符串(甚至使用相同的浏览器)。 但是您当然可以充分缩小可能的候选范围,以便提供量身定制的内容。

另请检查这些相关问题

I think you cannot be certain of the exact phone used in many cases because many phones share the same user-agent string (and even use the same browser). BUt you can certainly narrow the possible candidates enough as to serve tailored content.

Check these related questions as well

内心激荡 2024-08-05 16:04:11

iPhone UA 签名为:

/Apple.*Mobile.*Safari/

The iPhone UA signature is:

/Apple.*Mobile.*Safari/
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文