PHP FAQ's
PHP FAQ's
By using 
$_SERVER['HTTP_USER_AGENT']
variable.