Thread: IP Logging
View Single Post
Old 09-28-2010, 11:32 PM   PM User | #9
djdubuque
New Coder

 
Join Date: May 2009
Posts: 47
Thanks: 2
Thanked 0 Times in 0 Posts
djdubuque is an unknown quantity at this point
Quote:
Originally Posted by redhead View Post
that script will only work in you have server side includes supported on your server... and even if you did i wouldnt use javascript to then put it in the box... id use <input ....... value="<!--#echo var="REMOTE_ADDR"-->"...

presuming you have PHP supported, heres something that should store the IP address...
PHP Code:
<?php
// get the IP
$ip $_SERVER["REMOTE_ADDR"];
$ip .= "\n" implode(''file('ips.dat'));

// write into the IPs file
$fq fopen("ips.dat","w");
fwrite($fq$ip); 
fclose($fq);
?>
hope that helps you abit...
How do I get this to add the IPs one per line?

right now it will just add them on one line.
djdubuque is offline   Reply With Quote