Created
July 6, 2010 12:57
-
-
Save GaretJax/465350 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Loads the class | |
require 'path/to/Browscap.php'; | |
// Creates a new Browscap object (loads or creates the cache) | |
$bc = new Browscap('path/to/the/cache/dir'); | |
// Gets information about the current browser's user agent | |
$current_browser = $bc->getBrowser(); | |
// Output the result | |
echo '<pre>'; // some formatting issues ;) | |
print_r($current_browser); | |
echo '</pre>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment