I recently started to use the get_browser()
function inside of PHP and I encountered a major issue. I am trying to return the browser that the user is using back to the user but when I run the code:
$browser = get_browser(null, true);
print($browser['browser']);
It returns 'DefaultBrowser'. I updated my Browscap.ini file and specified the location in my php.ini file but it seemed to change nothing. Any solutions, I am very new to PHP. Thanks
Unfortunately the browscap.ini file is not updated as often as browsers (which is very very often, these days). Fortunately, you can just edit the file yourself and copy-paste the newest browsers that are in there, and then increment the version number. Generally the capabilities will be the same or better, so it shouldn't cause problems.
[EDIT]
The browscap.ini file contains entries like
A general entry for the version, plus a number of entries for specific platforms. You can just copy these, change the version from 10 to 11, and then add them to the file.
So those two entries would become