For browser detection Iuse:
<?
if((ereg("Nav", getenv("HTTP_USER_AGENT"))) || (ereg("Gold", getenv("HTTP_USER_AGENT"))) || (ereg("X11", getenv("HTTP_USER_AGENT"))) || (ereg("Mozilla", getenv("HTTP_USER_AGENT"))) || (ereg("Netscape", getenv("HTTP_USER_AGENT"))) AND (!ereg("MSIE", getenv("HTTP_USER_AGENT")))) $browser = "ns";
elseif(ereg("MSIE", getenv("HTTP_USER_AGENT"))) $browser = "ie";
else $browser = "Other";
?>
for browser detection. it will only return whether it's netscape, ie or other but it's a start. There will be more specific ones out there if you look.
You might want to do a OS check as well so you can tailor your pages for eveyone, I use:
<?
unset ($platform);
function browser_get_platform() {
global $platform;
return $platform;
}
if (strstr($HTTP_USER_AGENT,'Win')) {
$platform = 'Win';
} else if (strstr($HTTP_USER_AGENT,'Mac')) {
$platform = 'Mac';
} else if (strstr($HTTP_USER_AGENT,'Linux')) {
$platform = 'Linux';
} else if (strstr($HTTP_USER_AGENT,'Unix')) {
$platform = 'Unix';
} else {
$platform = 'Other';
}
?>
which seems to work a treat.
You can then either redirect to specific pages or include specific pages. Or build a series of if and else if statements into a single page that will control the output for the specific user. This way you won't end up with masses of files.