the latest
October 20, 2008 New Backup Script has been launched. Some house keeping has been done around the site and we have a few new items to be added soon.

the greatest

» Backup Script
» Contact Script
» PHP Includes
» Image Gallery

Determine Browser

Description

Quickly find out what browser your user is using.

Tutorial

This tutorial will show you how to tell what browser a visitor is using. This only works for the big two.

It can tell you something like this - Internet Explorer (MSIE/Compatible)


<?

if (strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') )
{
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Netscape') )
{
$browser = 'Netscape (Gecko/Netscape)';
}
else if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') )
{
$browser = 'Mozilla Firefox (Gecko/Firefox)';
}
else
{
$browser = 'Mozilla (Gecko/Mozilla)';
}
}
else if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') )
{
if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') )
{
$browser = 'Opera (MSIE/Opera/Compatible)';
}
else
{
$browser = 'Internet Explorer (MSIE/Compatible)';
}
}
else
{
$browser = 'Others browsers';
}

echo $browser;

?>


Home : Services : Scripts : Tutorials : Hosting : Contact