Jump to content
Sign in to follow this  
SandySynaptik

How Can I Get User's Browser's Version?

Recommended Posts

I want to have the browser's version in a variable and show it somewhere on the page. Every browser have different version pattern I think. How can I do so?

Share this post


Link to post
Share on other sites

Is there a particular reason why you need the version? A lot of people change their user agent string, so there's no real way to tell what browser version they're using, or even what browser they're using.

Share this post


Link to post
Share on other sites

I am trying to make my own "What's Your IP Address" page. There is nothing technical. So, how can I?

Share this post


Link to post
Share on other sites

You don't need to know what browser they're using to show their IP address. Like I said, there's no real way to find out. You can look at some user agent strings and try to find a regular expression that will get the version from it.

Share this post


Link to post
Share on other sites

I know I know that I don't need to know about their browser to show their IP address. Showing IP address is just a part of that. Till now I have extended that page to show.

  1. User's IP address
  2. User's Browser
  3. User's Screen Resolution
  4. and user's User Agent

I want to add more details as possible.

Share this post


Link to post
Share on other sites

Fox, what about PHP's $_SERVER['HTTP_USER_AGENT'] ? Is that a reliable way to find out users browser info?

Share this post


Link to post
Share on other sites
Is there a particular reason why you need the version? A lot of people change their user agent string, so there's no real way to tell what browser version they're using, or even what browser they're using.
Though really I meant to say that people can change their user agent string, not that it's a common thing to do. I did say you could extract browser information from the user agent string:
You don't need to know what browser they're using to show their IP address. Like I said, there's no real way to find out. You can look at some user agent strings and try to find a regular expression that will get the version from it.
Different user agent strings will probably need different expressions to retrieve the version.

Share this post


Link to post
Share on other sites

check this http://au2.php.net/m...get-browser.php $_SERVER['HTTP_USER_AGENT'] itself is unrilable. if you check the header of any request you will see the user agen header also. which is visible there you can assume it can be spoofed and is not reliable. get_browser() also use $_SERVER['HTTP_USER_AGENT']. so there is no determined way to detect browser.

Edited by birbal

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...