Detect browser and OS with PHP?

chrome os
Aaron asked:


I need a php that detects what browser the user is using to view my web page. I need it to detect. Internet explorer, Firefox, Safari, Opera, Chrome and others. I don’t need the version number.

I want it also to detect the Operating system of the user. I don’t need to know exactly what OS it is.

I prefer that it will give me the complete name of the Browser and OS.

For example. If the user is viewing the web page using Firefox 3 on windows xp, what I need this:

Windows
Firefox

The OS that I need to detect are: Windows, Mac, Linux and Others

What I mean with others is if the user is not using none of the Browsers or OS of the list.

Please return the value in two separate variables. One for the browser and one for the OS.

I need it in php not in javascript

I don’t have alot of expirience with php

kuapp.com/

Related posts:

  1. Five Cross Browser Compatibility Tools Cross Browser Testing does precisely what it says across multiple web browsers like IE, Firefox, Safari and Camino etc....
  2. Lunascape Browser – Firefox, IE and Chrome wrapped into one A Tokyo based software company has created Lunascape – a free brower that handles all three major web rendering...
  3. Digia Web browser for Nokia 5800, N97 and 5530 (S60v5) Digia @Web is a modern, fully finger touch controllable, web browser for Nokia 5800, Nokia N97 and Nokia 5530....
  4. PeaceKeeper: The browser benchmark Peacekeeper is a free online browser benchmark tool. With Peacekeeper it’s quick and easy to compare different browsers to...
  5. KwiClick: Browser addon makes searching easier KwiClick is  a browser addon that enhances the way you interact with content from services like Google, Twitter, YouTube,...

This entry was posted on Monday, June 22nd, 2009 and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

3 Responses to “Detect browser and OS with PHP?”

  1. Red 10th account on June 23rd, 2009 at 8:44 pm

    i can haz google?
    =

    “I don’t have alot of expirience with php”
    Ok, again I will repeat this, very slowly because I think it’s very VERY important. I. Can. Haz. GOOGLE.

    Holy s**t, there’s a god damned PHP function for it. Ok, seriously dude, this is your answer:

    [Reply]

  2. JAB_au on June 24th, 2009 at 10:07 am

    See PHP manual:

    get_browser returns an array, and you can get values from it like OS and browser.

    [Reply]

  3. Doug G on June 24th, 2009 at 8:49 pm

    echo $_SERVER['HTTP_USER_AGENT']

    [Reply]

Leave a Reply

Additional comments powered by BackType

125x125 make money with your web site

LastPost

Archives

Recent Comments

Tags

3g 5800 android Applications blog Cell Phone Facebook firefox Flu Followers free Free Software Google iphone Itunes linux Lot Mexico microsoft money music N97 nokia Nokia 5800 Nokia Music Nokia Phone opensource Opensource Software Pandemic People Pigs s60v5 Swine Flu Thanks In Advance T Mobile Tweets twitter Video virus vista Wallpaper Wallpapers Wifi Yahoo youtube

  • Partner links


  • By N2H
    Blog Widget by LinkWithin