Mukhbir

 
  • Increase font size
  • Default font size
  • Decrease font size
  • default color
  • green color
  • blue color

User Ip Logger Script

E-mail Print PDF

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

Comments (0)Add Comment
Write comment
 
  smaller | bigger
 

busy
Last Updated ( Saturday, 27 December 2008 21:56 )