In PHP is there any way to store user’s browser details?? The reason for this is that I want to analyse all the unique devices the user is using his/her login credentials from. By browser details I mean if there is any sort of unique code a browser has that I can store to identify whether the logged in device is new or an existing one. I’ve already used get_browser(), it’s returning the browser versions and I don’t understand how to use it. Any help?
Question posted in PHP Versions
You can find a list of all versions here.
You can find a list of all versions here.
2
Answers
OPTION 1
This returns an string
OPTION 2
This will return an array of details.
You can try this function, then you can store this details to your database.
if this doesnt work. try reading this get_browser not working
The above example will output something similar to:
you can check docs here: https://www.php.net/manual/en/function.get-browser.php
Here is it.
Reference: https://www.php.net/manual/en/function.get-browser.php