Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Con este codigo se guardan las visitas en un .txt (visitas.txt)
- <?php
- date_default_timezone_set('America/Argentina/Buenos_Aires');
- $fecha = getdate();
- $hora = ($fecha["mday"]."/". $fecha["mon"]."/". $fecha["year"]." - ". $fecha["hours"].":". $fecha["minutes"]."";
- $txt="La ip:".$_SERVER['REMOTE_ADDR']." ha entrado: ".$hora." Con el navegador:".$_SERVER['HTTP_USER_AGENT'];
- $fd = fopen ("visitas.txt", "a" or
- die("Problemas en la conexion";
- fputs($fd,"\n";
- fputs($fd,$txt);
- fclose($fd);
- ?>
- ----------------------------------
- y con este se envia a tu email
- ----------------------------------
- <?php
- date_default_timezone_set('America/Argentina/Buenos_Aires');
- $fecha = getdate();
- $hora = ($fecha["mday"]."/". $fecha["mon"]."/". $fecha["year"]." - ". $fecha["hours"].":". $fecha["minutes"]."";
- $txt="La ip:".$_SERVER['REMOTE_ADDR']." ha entrado: ".$hora." Con el navegador:".$_SERVER['HTTP_USER_AGENT'];
- mail("TU EMAIL","Visita","$txt";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement