Download CodeIgniter User Guide : Welcome to CodeIgniter

Transcript
CodeIgniter User Guide : User Agent Class
}
$this->agent->agent_string()
Returns a string containing the full user agent string. Typically it will
be something like this:
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.4) Gecko/20060613
Camino/1.0.2
$this->agent->accept_lang()
Lets you determine if the user agent accepts a particular language.
Example:
if ($this->agent->accept_lang('en'))
{
echo 'You accept English!';
}
Note: This function is not typically very reliable since some
browsers do not provide language info, and even among those that
do, it is not always accurate.
$this->agent->accept_charset()
Lets you determine if the user agent accepts a particular character
set. Example:
if ($this->agent->accept_charset('utf-8'))
{
echo 'You browser supports UTF-8!';
}
Note: This function is not typically very reliable since some
file:///D:/_darkhorse/websites/codeigniter/user_guide/libraries/user_agent.html (4 of 5) [12/20/2007 11:00:30 PM]