PDA

View Full Version : Erm HTML Code?



Adam$
17-12-2005, 07:33 PM
Hey, does anyone know the HTML code where it displays the viewers IP address?

Thanks in advance,
-Adam

Newsie
17-12-2005, 08:43 PM
<script language="JavaScript">
VIH_BackColor = "white";
VIH_ForeColor = "black";
VIH_FontPix = "16";
VIH_DisplayFormat = "You are visiting from:<br>IP Address: %%IP%%<br>Host: %%HOST%%";
</script>
<script language="JavaScript" src="http://www.hashemian.com/js/visitorIPHOST.js.php"></script


Newsie

Adam$
17-12-2005, 08:47 PM
Thanks, +rep

Sygon
17-12-2005, 08:50 PM
Newsie


Thats javascript www.zymic.com goto php they got better ones than tht junk lol

Adam$
17-12-2005, 08:53 PM
Hm..

How do I make "Your IP (blah blah) has been recorded." ?

Sygon
17-12-2005, 09:00 PM
In a form or just in general

Newsie
17-12-2005, 09:05 PM
<script language="JavaScript">
VIH_BackColor = "white";
VIH_ForeColor = "black";
VIH_FontPix = "16";
VIH_DisplayFormat = "Your IP has been recorded:<br> %%IP%%<br>";
</script>
<script language="JavaScript" src="http://www.hashemian.com/js/visitorIPHOST.js.php"></script


Newsie

Adam$
17-12-2005, 09:08 PM
How do I get it without the host bit? I just want the IP and when I remove the bottom it f_cks up.

Newsie
17-12-2005, 09:09 PM
Sorry, no clue.


Newsie

nets
17-12-2005, 09:15 PM
<?php
$ip = $_SERVER['REMOTE_ADDR'];
echo $ip;
?>

Sygon
17-12-2005, 09:27 PM
Newsie dont post it if u dont know it

Splinter
17-12-2005, 09:34 PM
Hm..

How do I make "Your IP (blah blah) has been recorded." ?
to record a users ip etc.. use:


<?php
$ip = $_SERVER['REMOTE_ADDR']; //Get the ip

$fp = fopen("log.txt", "r+") or die ( ERROR );
fputs ($fp, "$ip \n"); //Places the ip in log.txt
fclose($fp);

echo "Your ip has been recorded.";
?>

Adam$
17-12-2005, 10:24 PM
Thanks peoples. :P

Want to hide these adverts? Register an account for free!