Quello che cerchi è immagazzinato nella variabile $_SERVER['HTTP_USER_AGENT']