get_browser() and browscap.ini

Php has some very useful ways to garner browser information. One of the most basic ways is inquire about user agent with

There is another function get_broswer() which holds a whole slew of additional, useful information. However it is not available by default. A special configuration file is needed, browscap.ini which should be set in the php.ini file. There are ways around this if php.ini is not accessible/editable on a shared system.

In PHP’s manual it reads:

In order for this to work, your browscap configuration setting in php.ini must point to the correct location of the browscap.ini file on your system.

The process for getting this function to work is worth the minimal effort. A few usage examples:

Comments are closed.



  • slide
  • slide
  • slide
  • slide
Casino Canada Online