Jump to content

I need help showing users their OS an browser

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
lil-fino

lil-fino

    Newbie

  • Members
  • PipPip
  • 15 posts
For the browser i used this:
<?php 

 echo $_SERVER['HTTP_USER_AGENT'];

 ?> 

and i get a lot of stuffs that i dont need. I just want to tell the user: "your browser is firefox and you are running windows vista

just like this image:

Posted Image

Sorry for my bad english :crying:

#2
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
You need to split it into parts with for example explode function.
a page I found that can be nice for you is UserAgentString.com - List of User Agent Strings which shows examples and breakdowns of user strings to help you understand how they are built up. they also have a long list of different browsers and their user agent strings.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall