Display IP

Status
Not open for further replies.

SomeoneH

New Member
Messages
32
Reaction score
0
Points
0
I'm pretty sure its possible, but I dont have a clue how.
 

animerth

New Member
Messages
86
Reaction score
0
Points
0
It's much easer with php and the output from php is HTML

something like this will do

PHP:
<?php
echo $_SERVER["REMOTE_ADDR"]; 
?>
save as name_here.php

or you can use SSI and javascript

PHP:
<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>
save as name_here.shtml
 
Status
Not open for further replies.
Top