1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Use the browscap.ini file
This guide is about "browscap.ini", a configuration file used by the PHP library "browscap" that contains information about web browsers and their features, such as their name, version, compatible operating systems, browsing capabilities, etc.
File information
The file "browscap.ini" reflects the latest information about web browsers. It can be used with PHP scripts that require the "browscap" library.
phpinfo indicates where the file browscap.ini is located, namely:
/opt/php/lib/php/browscap.iniYou can retrieve the content of the file yourself via a PHP script, for example:
<?php
header("Content-type: text/plain");
print file_get_contents("/opt/php/lib/php/browscap.ini");
?>Note that the "browscap" library is no longer widely used and that many developers prefer other solutions to detect browsers, such as the native PHP function "get_browser()".