My favorites | Sign in
Logo
                
Activity: Medium
Code license:
MIT License
Labels:
php, browscap, browser, webdev
Featured downloads:
Browscap-php5-r17.zip
Show all »
Featured wiki pages:
Credits
QuickStart
Show all »





NEWS: July 6th, 2010 Development moved to github: http://github.com/garetjax/phpbrowscap. Active contributors or maintainer seeked!










Browser Capabilities PHP Project

HACKING AROUND WITH PHP TO HAVE A BETTER SOLUTION THAN GET_BROWSER()

Introduction

The browscap.ini file is a database maintained by Gary Keith at http://browsers.garykeith.com/ which provides a lot of details about browsers and their capabilities, such as name, versions, Javascript support and so on.

PHP's native get_browser() function parses this file and provides you with a complete set of information about every browser's details. But it requires the path to the browscap.ini file to be specified in the php.ini browscap directive which is flagged as PHP_INI_SYSTEM. That means in most shared hosting environments you cannot edit the php.ini file.

Browscap is a standalone class for both PHP4 and PHP5 that gets around the limitations of get_browser() and manages the whole thing. It offers methods to update, cache, adapt and get details about every supplied user agent on a standalone basis.

Features

Here is a feature list of the Browscap class:

Contact

Because your opinion matters.

If only to say "Hello, it works!", or to ask for a feature or report a bug, or for basic support write to:

Also via instant messenger:









Powered by Google Project Hosting