Click to See Complete Forum and Search --> : check version


tanfwc
09-13-2003, 04:00 AM
is there any script that can check browser version....etc....and even the ip address?

swon
09-13-2003, 04:13 AM
check out this:

<html>
<head>
<title>swon</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="Ulli Meybohms HTML EDITOR">
<link rel="stylesheet" href="../font.css" type="text/css">
<style type="text/css">
<!--
input{background-color:#C78116;font-family:arial,helvetica;font-size:8pt;color:#000000;}
option {background-color:black;font-family:arial,helvetica;font-size:8pt;color:#DFDFDF;}
-->
</style>
<script language="JavaScript">
<!--


function farb(f)
{
document.bgColor=f;
}



function brows(){

var hoehe, breite, farbe, os, name, browser, sprache;
hoehe = screen.height;
breite = screen.width;
farbe = screen.colorDepth;
os = navigator.platform;
name = navigator.appName;
browser = navigator.userAgent;
sprache = navigator.language;
jav=navigator.javaEnabled();

if(jav = true)
{document.form1.java.value= "ein";}
else if(jav = false)
{document.form1.java.value= "aus";}
document.form1.name.value= name;
document.form1.version.value= browser;
document.form1.bild.value= breite +" " + "x" +" " +hoehe ;
document.form1.depth.value= farbe + "bit";

var plugin = (navigator.mimeTypes &&
navigator.mimeTypes["application/x-shockwave-flash"] ?
navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0);

if ((navigator.appName == "Microsoft Internet Explorer" &&
navigator.appVersion.indexOf("Mac") == -1 &&
navigator.appVersion.indexOf("3.1") == -1) || (plugin &&
parseInt(plugin.description.substring(plugin.description.indexOf(".")-1))>=
4))
{
//IF THE USER HAS THE CORRECT PLUGIN, FORWARD THEM TO THE FLASH PAGE
document.form1.plugin.value = "Yes";
}
else
{
//IF THE PLUGIN CANNOT BE FOUND, FORWARD THE USER TO THE NON FLASH PAGE
document.form1.plugin.value ="No"
}


}

function check(){
if(navigator.appName == "Netscape")
{top.location.href="http://home.netscape.com/computing/download/index.html"}
else if(navigator.appName == "Microsoft Internet Explorer")
{top.location.href="http://www.microsoft.com/downloads/search.asp?"}

}
function leit(){
alert("------- Wegleitung -------- \nGehen Sie unter EXTRAS auf INTERNETOPTIONEN und wählen Sie ERWEITERT.\nMarkieren Sie ein Häkchen bei Java aktivieren/deaktivieren.")
}

//-->
</script>
<noscript>Bitte schalten Sie Javascript ein!(Unter EXTRAS wählen Sie INTERNETOPTIONEN dann ERWEITERT und kreuzen Sie entsprechendes an!)</noscript>
</head>
<body text="#000000" bgcolor="#DE9F06"link="#FF0000" alink="#FF0000" vlink="#FF0000"onLoad="brows()" topmargin="0"marginheight="0" leftmargin="80" marginwidth="80">

<form name="form1">
<table border="0" align="left"bordercolor="#5F5F5F" cellspacing="0"cellpadding="0" align="center">
<tr height="5"></tr>
<tr>
<td colspan="2" height="40"><p class=2>&nbsp;&nbsp;&nbsp;Browsermerkmale und Einstellungen</p></td>
<td align="right" valign="top" ><img src="../images/spacer.gif" width="10" height="1" border="0" alt=""></td>
</tr>
<tr>
<td align="right" width="100"><p>&nbsp;Browser-Name:&nbsp;</p></td>
<td><input type="text" name="name" value="" size="25"></input></td>
<td align="center"><a href="javascript:check()"><img src="../images/spacer.gif" width="150" height="15" border="0" alt=""></a></td>
</tr>

<tr>
<td align="right"><p>&nbsp;Version:&nbsp;</p></td>
<td><input type="text" name="version" value="" size="45"></input></td>
<td align="right"><a href="javascript:check()"><img src="../images/spacer.gif" width="150" height="15" border="0" alt=""></a></td>
</tr>

<tr>
<td align="right"><p>&nbsp;Flash-Plugin:&nbsp;</p></td>
<td><input type="text" name="plugin" value=""></input></td>
<td align="right"><a href="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0"><img src="../images/spacer.gif" width="150" height="15" border="0" alt=""></a></td>
</tr>

<tr>
<td align="right"><p>&nbsp;Java:&nbsp;</p></td>
<td><input type="text" name="java" value=""></input></td>
<td align="right"><a href="javascript:leit()"><img src="../images/spacer.gif" width="150" height="15" border="0" alt=""></a></td>
</tr>

<tr>
<td align="right"><p>&nbsp;Screen Resolution:&nbsp;</p></td>
<td><input type="text" name="bild" value=""></input></td>
<td align="center"></td>
</tr>

<tr>
<td align="right"><p>&nbsp;Colordepth:&nbsp;</p></td>
<td ><input type="text" name="depth" value=""></input></td>
<td align="center">
</td>
</tr>
<tr>
<td colspan="3" height="50">&nbsp;</td>
</tr>

</table>
</form>
</body>
</html>

tanfwc
09-13-2003, 04:17 AM
thanx...that was a nice and neat one...then how about ip address?

swon
09-13-2003, 04:31 AM
Do you use a server side scriptlanguage , for example PHP?

tanfwc
09-13-2003, 07:31 AM
erm...that one i not very sure....how do i do it? erm...i am using IIS 5.1...how do i do it?