Search code examples
phpcakephpuser-interfaceuser-agent

Get `useragent` property with CakePHP?


How can I get the useragent property with CakePHP built in tool?


Solution

  • Make use of the inbuilt CakePHP function env().

    env('HTTP_USER_AGENT');