Allora prova così:
Codice PHP:
    $osar = array("Windows XP" => "Windows NT 5.1",
            
"Windows 2000" => "Windows NT 5.0",
            
"Windows ME" => "Windows NT 4.90",
            
"Windows 95" => "Win95",
            
"Windows 98" => "Win98",
            
"Windows NET" => "Windows NT 5.2",
                
"Windows NT" => "WinNT4.0",
            
"Mac" => "Mac|PPC",    
            
"Linux" => "Linux",
            
"FreeBSD" => "FreeBSD",
            
"SunOS" => "SunOS",
            
"Irix" => "Irix",
            
"BeOS" => "BeOS",
            
"OS/2" => "OS/2",
            
"AIX" => "AIX",
           )

    foreach(
$osar as $chiave => $valore){
        if(
eregi($valore$_SERVER["HTTP_USER_AGENT"])){
            
$os=$chiave;
        }else{
            
$os='Altro';
        }
    }
    echo 
$os
non testato ma dovrebbe andare.
Basta che aggiungi quelli che ti interessano, tipo windows 7, 8 o altro.