Hello Everyone, I am trying to modified the code below to create a daily IP log file. I am a newbie so any help would be appreciated. Thanks! --------------------------------------------------------------------- <?php function logIP() { // $ipLog="logfile.html"; // Your logfiles name $ipLog=("iplogfile2-".gmdate('Y-m-d').".html"); // IP logging $register_globals = (bool) ini_get('register_gobals'); if ($register_globals) $ip = getenv(REMOTE_ADDR); else $ip = $_SERVER['REMOTE_ADDR']; $date=date ("H:i"); $log=fopen("$ipLog", "a+"); if (preg_match("/\bhtm\b/i", $ipLog) || preg_match("/\bhtml\b/i", $ipLog)) { fputs($log, "$ip - $date<br>"); } else fputs($log, "$ip - $date\n"); fclose($log); } logIp(); ?> --------------------------------------------------------
yes just modify this according to your need http://smashscripts.blogspot.com/2007/05/php-ip-logger.html Regards Alex
Thanks Alex but I do not see an example of creating a unique IP log file on a daily basis. Can you please explain further. Thanks!