ソース: <?php try { $u = $_SERVER['HTTP_USER_AGENT']; if (preg_match("/MSIE \d/", $u, $matches)) $x = $matches[0]; elseif (preg_match("/Firefox\/\d/", $u, $matches)) $x = $matches[0]; elseif (preg_match("/Safari/", $u, $matches)) $x = $matches[0]; elseif (preg_match("/Opera/", $u, $matches)) $x = $matches[0]; elseif (preg_match("/Mozilla\/\d/", $u, $matches)) $x = $matches[0]; else $x = "Other"; $db