Script PHP berikut dapat digunakan untuk mengetahui jenis browser yang digunakan.
<?php
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;
?>
Sumber: http://drupal.org/node/65903
makasih gan infonya…..
sangat membantu….
http://iklankeras.com