PDA

View Full Version : Add auto-updates for browscap.ini


Torchwood
11th April 2010, 21:55
New person here... currently using ISPConfig 2, waiting for Rails support for ISPConfig 3.03, and I have a small feature request.

One of the functions in PHP is the get_browser() function, which returns browser capabilities. This relies on a updated browscap.ini file, which is available from http://browsers.garykeith.com/downloads.asp . The browscap file have a header at the beginning that looks like this:[GJK_Browscap_Version]
Version=4534
Released=Sat, 10 Apr 2010 01:03:16 -0000Since we know the version # of the installed browscap, we could check once-per-day against http://updates.browserproject.com/version-number.asp . If the version numbers are different, then grab the updated browscap.ini file and install it.

Why is this important? get_browser() requires the path to the browscap.ini file to be specified in the php.ini browscap directive which is flagged as PHP_INI_SYSTEM. This can only be specified at the system level, not at a user level. And ISP maintains the system-level php.ini file.