I am developing a CMS that needs to start off based upon Operating System and then the architecture of the system. I am using the
$_SERVER['HTTP_USER_AGENT']
to start with, but it seems that I am getting inconsistent results from computer to computer. Here are 2 Vista system reports from that variable I received from coworkers:
Vista x86 Business:
Firefox:
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5
IE:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)
Vista x64
x86-IE Browser:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; InfoPath.2)
x64-IE Browser:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Win64; x64; .NET CLR 2.0.50727; SLCC1; .NET CLR 3.0.04506)
Firefox:
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
It looks as though I should just preg match on if "64" exists within the string for an IE browser, but I don't know how to do it with Firefox. If anyone has a better example of how to do it or with even another language (like JS), I would appreciate any response or input.
Cheers.