this script logs the user ip with the time of visit in a text or any file. It can also be used to save data to database with some code modifications.
======================================================================
1. php file
<?php
$date = date('l dS \of F Y h:i:s A');
$c=$_SERVER['HTTP_X_FORWARDED_FOR'];
$d=$_SERVER['REMOTE_ADDR'];
$f=fopen('ip.txt','a+');
fwrite($f,$date . " ");
fwrite($f,$c . " HXFF - ");
fwrite($f,$d . " RA\n");
fclose($f);
?>
======================================================================
2. ip.txt
create a ip.txt file and make it writable
Set as favorite
Bookmark
Email This
Hits: 190
Comments (0)










