Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. <?php
  2. #####################################################
  3. ## Guarda Ip ##
  4. ## Created by: Sherlock Holmes, Robercid & LittleJ ##
  5. #####################################################
  6.  
  7. $archivo = "guardaip.txt"; //Esto creará el Archivo donde guarda las ips
  8. $manejador = fopen($archivo,"a") or die("Imposible abrir el archivo\n"); //Esto abre el archivo
  9. $ip = $_SERVER['REMOTE_ADDR']; //Esto muestra la ip
  10. $fecha= date("m/d/y")."|"; //Esto muestra la fecha
  11. fwrite($manejador,$ip.' '.$fecha); //Esto muestra la ip y la fecha en el archivo
  12. fclose($manejador); //Esto Hace que se cierre el archivo
  13. echo date("m/d/y"); //Esto muestra la fecha
  14. echo " Tu Ip: $ip a sido guardada." //Esto muestra un texto
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement