Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

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..

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
221 views
Welcome To Ask or Share your Answers For Others

1 Answer

There is a really simple solution to use Mobile-detect here: https://github.com/serbanghita/Mobile-Detect/

Enjoy!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...