forked from bcit-ci/CodeIgniter
-
Notifications
You must be signed in to change notification settings - Fork 0
MY User agent
World Wide Web Server edited this page Jul 4, 2012
·
3 revisions
Category:Libraries::Extended add the methods you think are useful [code] class MY_User_agent extends CI_User_agent { function MY_User_agent() { parent::CI_User_agent(); }
function is_xhr()
{
if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) &&
strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
{
return true;
}
else
{
return false;
}
}
} [/code]