Browser Name and Version

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Browser Name and Version

    Anybody knows all browsers name and version include for mobiles (e.g: Opera/10.00 or NokiaN81 or Opera Mini/4.2)?I found a code but it not enough what i modify..
    Browser ID Strings (a.k.a. User Agent ID)
    PHP Code:
    <?php
    //$browsers = split(" ", $browsers);
    $browsers = array("mozilla""msie""gecko""firefox""konqueror""safari""netscape""chrome""seamonkey""navigator""mosaic""lynx""avant""camino""flock""aol""amaya""omniweb""opera""opera mini""nokia");
    $nua strtolower($_SERVER['HTTP_USER_AGENT']);
    $l strlen($nua);
    for (
    $i=0$i<count($browsers); $i++)
    {
    $browser $browsers[$i];
    $n stristr($nua$browser);
    if(
    strlen($n)>0)
    {
    $GLOBALS["ver"] = "";
    $GLOBALS["nav"] = $browser;
    $j=strpos($nua$GLOBALS["nav"])+$n+strlen($GLOBALS["nav"])+1;
    for (; 
    $j<=$l$j++)
    {
    $s substr($nua$j1);
    if(
    is_numeric($GLOBALS["ver"].$s))
    $GLOBALS["ver"] .= $s;
    else
    break;
    }
    }
    }
    echo 
    "".$GLOBALS["nav"]."/".$GLOBALS["ver"]."";
    ?>
    www.inbuzunar.mobi - Your mobile portal pocket
Working...
X