PHP User Agent is available through Packagist via Composer.
The classic procedural use is as simple as: The new object-oriented wrapper form: