All Written By Me you will need to make this a php document and then create a file on the same directory called iplogsource.txt
Wana Test it?
whatsmyip.php
and the log is
iplogsource.txt
Code:<html>
<body bgcolor="red">
<?php
echo "Your iP iS: ";
echo $_SERVER['REMOTE_ADDR'];
$ip = $_SERVER['REMOTE_ADDR'];
$myFile = "iplogsource.txt";
$fh = fopen($myFile, 'a') or die("can't open file");
$stringData = "------------------------------------------";
fwrite($fh, $stringData);
$time = date("r");
fwrite($fh, $time);
$Space = "\n";
fwrite($fh, $Space);
$stringData = $ip;
fwrite($fh, $ip);
$stringData = "\n";
fwrite($fh, $stringData);
$stringData = "\n";
fwrite($fh, $stringData);
fclose($fh);
?>
</html>