Using php Function
I wanna ask, how to know If the visitor to my website using a mobile phone or PC? using php function
Any answers as fast as possible
There is no way to know for sure. About the best you can do is look at the $_SERVER['HTTP_USER_AGENT'] string and make some educated guesses. There are probably some 3rd party classes/functions out their you could find, but ultimately it's still a guess since that header can be spoofed or omitted, plus new devices/browsers may be coming out with new strings all the time.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)