9

I need to get full infomation of user agent in controller magento. Is there the way to get it?

1 Answer 1

29
Mage::helper('core/http')->getHttpUserAgent()

Internally it is just accessing $_SERVER as you would normally but also does some character encoding stuff. Using this way allows other modules/developers to modify the returned value, which makes it future proof.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.