PHP Browser Checking Script
Several factors are to be considered should one be involved with deploying projects over the internet. One of the things you could do would be to have a nifty script that checks for the particular browser your clients might be using. This can be done with a simple and short piece of code that can mean the difference between a successful deployment without problems allowing proper extensions and plugins to be included. A sample of the code can be seen below for your reference which makes it easier for your program/web page to know which set of scripts and what parameters to adhere with.
$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
?>
As we can see, two examples of browsers are shown, IE and Mozilla which are two of the most common browsers being used by the many computers over the internet. Knowing this may mean the difference between having the proper scripts for use with any particular browser making it a nice thing to add to your page.
