You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 26, 2020. It is now read-only.
<p>The User Agent Class provides functions that help identify information about the browser, mobile device, or robot visiting your site.
In addition you can get referrer information as well as language and supported character-set information.</p>
<h2>Initializing the Class</h2>
<p>Like most other classes in CodeIgniter, the User Agent class is initialized in your controller using the <dfn>$this->load->library</dfn> function:</p>
<code>$this->load->library('user_agent');</code>
<p>Once loaded, the object will be available using: <dfn>$this->agent</dfn></p>
<h2>User Agent Definitions</h2>
<p>The user agent name definitions are located in a config file located at: <dfn>application/config/user_agents.php</dfn>. You may add items to the
various user agent arrays if needed.</p>
<h2>Example</h2>
<p>When the User Agent class is initialized it will attempt to determine whether the user agent browsing your site is
a web browser, a mobile device, or a robot. It will also gather the platform information if it is available.</p>