<html>
<head>
<script type="text/javascript">
var xmlHttp = false;
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
xmlHttp = false;
}
}
// ... f�r Mozilla, Opera und Safari
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
xmlHttp = new XMLHttpRequest();
}
function ipshow()
{
if (xmlHttp) {
xmlHttp.open('GET', 'getip.php');
xmlHttp.onreadystatechange = function () {
if (xmlHttp.readyState == 4) {
document.getElementById("userip").innerHTML = xmlHttp.responseText;
document.test.verarbeitung.value = xmlHttp.responseText;
}
};
xmlHttp.send(null);
}
}
function showip()
{
alert(document.test.verarbeitung.value)
}
</script>
</head>
<body onload="ipshow();">
<div id="userip"></div>
<form name='test'>
<input type='hidden' id='verarbeitung' name='verarbeitung' value=''>
</form>
<input type='submit' value='show my ip' onclick='showip();'>
</body>
</html>