ryansenara
New Member
- Messages
- 3
- Reaction score
- 0
- Points
- 0
Can I display clien ip address in my web page using html and javascript ?
<?php
echo $_SERVER["REMOTE_ADDR"];
?>
<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>