Wowzio
grab this · electronics blog
Detect browser and OS with PHP?
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 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:
- Five Cross Browser Compatibility Tools Cross Browser Testing does precisely what it says across multiple web browsers like IE, Firefox, Safari and Camino etc....
- 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...
- 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....
- PeaceKeeper: The browser benchmark Peacekeeper is a free online browser benchmark tool. With Peacekeeper it’s quick and easy to compare different browsers to...
- 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,...





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]
See PHP manual:
get_browser returns an array, and you can get values from it like OS and browser.
[Reply]
echo $_SERVER['HTTP_USER_AGENT']
[Reply]