To get information from the user’s browser in php there is a function called get_browser(). It returns an object which will contain various information, as the browser name or if javascript is enabled.
So I tried this function but my hosting server show me this error: browscap ini directive not set.
Looking on php.net I found that it works “by looking up the browser’s information in the browscap.ini file.”. Because it’s not my server I can’t do nothing, so I wrote to my hosting support and they gave me an alternative solution: phpbrowscap.
Just follow the QuickStart guide to set up the script and make it works.
If you need get_browser() function but you have server problem use this workaround.