README.txt 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. Browscap provides an improved version of PHP's get_browser() function.
  2. The get_browser() function can be used to tell what a visitor's browser is
  3. capable of. Unfortunately, the version provided by PHP has a number of
  4. limitations, namely:
  5. * It can be difficult or impossible to configure for shared hosting
  6. environments.
  7. * The data used to identify browsers and determine their capabilities requires
  8. consistent maintenance to keep up-to-date.
  9. Browscap automates maintenance by storing browser data in a database and
  10. automatically retrieving the latest data on a configurable schedule.
  11. Requirements
  12. ------------
  13. Browscap requires that your server be able to "phone out" (make a http request)
  14. to retrieve and update its user agent database.
  15. Note: Some hosting companies have this capability blocked.
  16. Recommendations
  17. ---------------
  18. If you are using MySQL, it is recommended to use InnoDB and not MyISAM as the
  19. table storage engine. (InnoDB is the default for Drupal 7.) MyISAM does not
  20. support transactions, and without transactions Browscap may not return correct
  21. browser information while new Browscap data is being loaded.
  22. Installation
  23. ------------
  24. Browscap can be installed via the standard Drupal installation process.
  25. https://drupal.org/node/895232
  26. API
  27. ---
  28. Modules can make use of browscap data by calling browscap_get_browser()
  29. anywhere they would otherwise call the PHP get_browser()
  30. (https://secure.php.net/manual/en/function.get-browser.php) function.
  31. Note: browser_name_regex is not returned.
  32. Drush integration
  33. -----------------
  34. To import the data via drush, use `drush browscap-import`.
  35. Credits
  36. -------
  37. Development of Browscap is sponsored by Acquia (https://www.acquia.com) and the
  38. Ontario Ministry of Northern Development and Mines (http://www.mndm.gov.on.ca).
  39. A special thanks goes out to Gary Keith (http://www.garykeith.com) who provides
  40. regular updates to the browscap user agent database, and specifically for
  41. adding a non-zipped CSV version of browscap to support this module.