How do I get the browser version? I have done the browser detection part but every browser have different algorithm of its version release and its hard to get it. I already
You can get it easily with get_browser()
<?php
$browser = get_browser();
$version = $browser->version;
I have found PPK's JavaScript-based browser detection code to be very reliable.
A google search for 'php browser version detection' return get_browser() as the first result. Please search before posting.
Your only chance is to grab the User-Agent
from the $_SERVER
array. And there is no rule that forces a browser to include its version.