Results 1 to 2 of 2

Thread: Using php Function

  1. #1
    Join Date
    Apr 2010

    Using php Function

    Hello guys,

    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

  2. #2
    Join Date
    Aug 2004
    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)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles