How do you get the Browser information?
Answers were Sorted based on User's Feedback
Answer / jahanvi
get_browser() attempts to determine the capabilities of the
user's browser. This is done by looking up the browser's
information in the browscap.ini file.
echo $_SERVER['HTTP_USER_AGENT'] . "<hr />\n";
$browser = get_browser();
foreach ($browser as $name => $value) {
echo "<b>$name</b> $value <br />\n";
}
| Is This Answer Correct ? | 8 Yes | 3 No |
Answer / 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 |
we have two tables first one is EMPLOYEE having EmpID, EmpNAME, Second table is SALARY table having id, salary Write a query to get name of those person who having more than 10000$ salary
What are the advantages of stored procedures in php?
How do I expire a php session after 30 minutes?
How to create a web form?
Can we extend final class in php?
What are the advantages of stored procedures, triggers, indexes in php?
What is the sign to start variables in PHP?
Suppose your Zend engine supports the mode <? ?> Then how can u configure your PHP Zend engine to support <?PHP ?> mode ?
What is difference between str_replace and substr_replace
Any good PHP developer looking for change
how can i upload only pdf files in my website? files has not a pdf extension mantioned
How to create connection in php?