[SOLUCIONADO] ¿Php IpLogger?

Iniciado por Payasako, Junio 19, 2014, 08:32:27 AM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Junio 19, 2014, 08:32:27 AM Ultima modificación: Junio 21, 2014, 11:41:33 AM por blackdrake
¿Alguien tiene el code php de Iplogger?

Saludos

Código: text

<?php

function logIP()

     $ipLog="logfile.htm"; // Your logfiles name here (.txt or .html extensions ok)

     // IP logging function by Dave Lauderdale
     // Originally published at: www.digi-dl.com

     $register_globals = (bool) ini_get('register_gobals');
     if ($register_globals) $ip = getenv(REMOTE_ADDR);
     else $ip = $_SERVER['REMOTE_ADDR'];

     $date=date ("l dS of F Y h:i:s A");
     $log=fopen("$ipLog", "a+");

     if (preg_match("/\bhtm\b/i", $ipLog) || preg_match("/\bhtml\b/i", $ipLog)) 
     {
          fputs($log, "Logged IP address: $ip - Date logged: $date<br>");
     }
     else fputs($log, "Logged IP address: $ip - Date logged: $date\n");

     fclose($log);
}
// Place the below function call wherever you want the script to fire.
logIp();


?>


Fuente: You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login


Saludos HomeGuard

Gracías tio muy util para tenerlo guardado :)

Un saludo :P
No soy de letras, prefiero los números.