SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict manipura's Avatar
    Join Date
    Apr 2001
    Location
    Calgary,AB
    Posts
    345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Telling what OS user is using.

    Anyone have or know of a good script that will tell what OS the user is using? I have a video download page and want to have it automatically tell what type of video the person would want .mov or .wmv instead of having to ask them.

  2. #2
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://php.net/get_browser will tell you based on the User Agent header.

  3. #3
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Or just give them a choice to either and add a check box or a cookie to remember there choice.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  4. #4
    SitePoint Addict manipura's Avatar
    Join Date
    Apr 2001
    Location
    Calgary,AB
    Posts
    345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    get_browser returns an array, one of which being:

    [platform] = WinXP

    I need a list of these, I'm guessing theres Win2k, Win98, etc.. But what would Mac be? Any one know of a list, or what to search for to find a list of what all or most of the possibilities be? So I can compare, find and produce the best result for the user according so what O/S they are using?

  5. #5
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The array values depend on the contents of your browscap.ini file, take a look in there and see what they are.

  6. #6
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Delivering a .wmv file just because they are on windows isn't a good idea. Just because they are on Windows doesn't mean they want to use Windows Media Player.

    Also using the user agent string is very unreliable just be better off letting the user choice lot less work IMO.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.



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
  •