M
M
mrWan2018-03-30 21:23:34
PHP
mrWan, 2018-03-30 21:23:34

What is the best way to find out what browser and version the user has?

There are many different solutions on the Internet, from ($_server[user agent]) to various options. I am almost sure that not all of these options are equally good. What is the best way?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander, 2018-03-30
@alexr64

that not all of these options are equally good. What is the best way?

Use all methods at once. Anyway, none of them guarantees 100% fidelity.

P
Paul Denisevich, 2018-03-31
@deniamnet

php.net/manual/en/function.get-browser.php

A
Andrew, 2018-03-30
@allard

What I used myself:
https://github.com/jenssegers/agent
https://github.com/sinergi/php-browser-detector

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question