How do you get the Browser information?
Answer Posted / ravi rajendra k
If you need a parser for getting OS, browser name and version details, use this pattern in a preg_match_all function.
$pattern = '#(?<browser>' . join('|', $known) .')[/ ]+(?<version>[0-9]+(?:\.[0-9]+)?)#i';
You can see my article www.peacemax.com/11/php/user-agents-php-snippet where i wrote the entire function for getting those details.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Why laravel is the best php framework in 2019?
How to read one character from a file?
Tell me how can we display information of a variable and readable by human with php?
Is it worth learning php in 2019?
How can I learn php fast?
How To Get the Uploaded File Information in the Receiving Script?
How does php serialize work?
How can we enable error reporting in php?
What software is required for php?
What is difference between python and php?
How to check an key is exists in array?
Is php a mvc?
What is strlen php?
Where are cookies stored php?
What is the maximum size of a database in mysql?