Can I display clien ip address in my web page using html and javascript ?
Can I display clien ip address in my web page using html and javascript ?
It's much easer with php and the output from php is HTML
something like this will do
save as name_here.phpPHP Code:<?php
echo $_SERVER["REMOTE_ADDR"];
?>
or you can use SSI and javascript
save as name_here.shtmlPHP Code:<script language="javascript">
var ip = '<!--#echo var="REMOTE_ADDR"-->'
function ipval() {
document.myform.ipaddr.value=ip;
}
window.onload=ipval
</script>
<form method="post" action="" name="myform">
<input type="text" name="ipaddr" readonly>
</form>