|
Question : How do I get the visitors browser information?Answer :You have more than one option when you want to get the information, they depends on how much information you want to get bout the browser. We will mention two ways here.
The first way to do it is simply by using the variable $HTTP_USER_AGENT, which holds information about browser version, name etc. If you want a class that can parse the information out of the variable look at the PHP Client Sniffer
The second one is to use php's get_browser function, though it has it drawbacks, because you need a browsercap.ini which has to be present at your isp, it gives much more information than other ways. To read more about get_browser, look here.
|