Browser Detection
<?php
require_once HORDE_BASE . '/lib/Browser.php'; $browser = new Browser();
if ($browser->hasFeature('images')) echo 'show images'; if ($browser->getFeature('javascript') == 1.2) echo 'supports dhtml';
?>
- Extensible; features can be added without breaking the API.
- Supports "quirks", such as IE 5.5's broken Content-Disposition handling, or
Netscape's reloading of forms when you resize the window.
|