Hi,
I installed Browscap module in my local system. I called browscap_get_browser() in my custom module hook_init() function. It is returning the below array.
Array ( [useragent] => unrecognized [browser_name_pattern] => unrecognized )
If its the case, how can I detect a browser? Should I install any other files along with the module?
Comments
Comment #1
kirantej_p commentedComment #2
calebtr commentedI had a similar issue. I had to clear the browscap cache and make sure that my browscap data was loaded by running cron.
Comment #3
aohrvetpv commentedTo work, Browscap needs to download browser information from http://browscap.org at least once. Browscap automatically downloads the data as part of Drupal cron. Two ways to see if it has successfully downloaded data:
1. Browse to admin/config/system/browscap. If data has been downloaded, you should see a version number next to "Current browscap data version".
2. Check that the contents of your
browscapdatabase table are non-empty. It should be populated with a lot of browser information.If you are still having problems, please let us know the results of those two checks.
Comment #4
aohrvetpv commented