获取特定的设备信息 [英] Get Specific Device Information
问题描述
仅使用PHP,是否有任何方法可以检测是否从SPECIFIC设备加载了页面?说,如果仅我的iPhone正在加载页面,而没有其他人正在加载页面,我希望页面做出不同的反应?
Using just PHP, is there anyway to detect if the page is being loaded from a SPECIFIC device? Say, I would want the page to react differently if only MY iPhone was loading the page, no one else's?
到目前为止,我唯一的解决方案是结合使用$ _SERVER ['REMOTE_PORT'和$ _SERVER ['HTTP_USER_AGENT']来验证iPhone,但这不能确保特定 iPhone ..
The only solution I have so far is to use $_SERVER['REMOTE_PORT' in conjunction with $_SERVER['HTTP_USER_AGENT'], to verify iPhone, but that doesn't ensure a specific iPhone..
推荐答案
有一个非常简单的解决方案,可以在此处使用移动检测": https://github.com/serbanghita/Mobile-Detect/
There is a really simple solution to use Mobile-detect here: https://github.com/serbanghita/Mobile-Detect/
享受!
这篇关于获取特定的设备信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!