|
Main (PHP)
3rd Party Streams
Resources
Code Snippets
Affiliates
|
|
|
| |
You Need to Know What Browser is Running |
| By admin (2008-09-20. 8205 views.) |
While developing a CSS heavy site using Joomla there are times where you just have to know - is this IE or not. Luckily (really not luck, the PHP folks always have a toolset available that you might need) the PHP standard library has a function to determine the browser capability.
At this point $browser is either "IE" or something else. That is really all you care to know typically. Then can do all the neato CSS different things you want to do.
By the way, the $browsercap has a boatload of other stuff that you may care about. |
|
<?php $browsercap = get_browser(null, true);
$browser = $browsercap['browser'];
printr($browsercap);
Array
(
[browser_name_regex] => ^mozilla/5.0 (windows; .; windows nt 5.1; .*rv:.*) gecko/.* firefox/0.9.*$
[browser_name_pattern] => Mozilla/5.0 (Windows; ?; Windows NT 5.1; *rv:*) Gecko
|
| |
|
| |
|
|
|
|
|
|
|
|
Top Sponsor
Sponsors
Sponsors
Advertisting
Affiliates
|
|