Tuesday, May 5, 2009

Find Browser using in PHP

if (strpos($_SERVER["HTTP_USER_AGENT"], 'Firefox')){
echo "Firefox";
} else if (strpos($_SERVER["HTTP_USER_AGENT"], 'MSIE 7')){
echo "IE 7";
} else if (strpos($_SERVER["HTTP_USER_AGENT"], 'MSIE 6')){
echo "IE 6";
}
?>

1 comment:

Sam said...

Simple and Usefull Script. Check some usefull PHP Interview Questions here.

Popular Posts