Browser is a simple wraper for the Browser Class, which is included.
Check the Browser Class often for new browsers or platforms.
This a very, very quick alpha release. Recomendations, comments, bugs are welcome but please use the forum.
protected/extensionsIn your config.php file, in the components section, add the following:
'browser' => array(
'class' => 'application.extensions.Browser.CBrowserComponent',
),
Then, in your controller or view, use it like this:
$browser = Yii::app()->browser->getBrowser(); $platform = Yii::app()->browser->getPlatform();
Total 1 comment
This component works great, but if you need to detect ipads make sure you update the browser detection class to the latest version at http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php.
Leave a comment
Please login to leave your comment.