SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2008
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Is there some PHP line to detect mobile phone?

    Is there some good PHP line to detect mobile phone as used by Amazon?
    They recognise mobile phone and show mobile content.

  2. #2
    SitePoint Member
    Join Date
    Oct 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    $_SERVER['HTTP_USER_AGENT'] will return user agent of the browser and OS name/version. You can check it so see if it is a mobile platform and send different content to them.

  3. #3
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    or $_REQUEST['HTTP_USER_AGENT'] but not on all servers. the $_SERVER['HTTP_USER_AGENT'] will work on all servers


Bookmarks

Posting Permissions

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