Inicio arrow Trucos y tutoriales arrow Tutoriales PHP y APACHE arrow Como Saber Si Me Visita Un Robot O Bot
Como Saber Si Me Visita Un Robot O Bot PDF Imprimir E-Mail

Código PHP:

<?php

// Lista de robots

$robot[] = "googlebot";
$robot[] = "msnbot";
$robot[] = "overture";
$robot[] = "lycos";
$robot[] = "seek";
$robot[] = "inktomi";
$robot[] = "yahoo";
$robot[] = "altavista";
$robot[] = "alexa";
$robot[] = "crawler";

foreach(
$robot as $bot){

    if(
eregi($bot, $HTTP_USER_AGENT)){

        echo
"me esta visitando un bot: " . $bot;

        
// puedes enviarte un mail para avisarte que te a visitado un robot

        
$destino = "tu@ejemplo.com";

        
$asunto = "Me visito un robot";

        
$mensaje = "Este robot: " . $bot . " me ha visitado mi pagina web";

        
$cabecera = "From: webmaster@" . $SERVER_NAME;

        
mail($destino, $asunto, "me visito: $bot", $cabecera);

    }

}

?>

 

Comentarios
Añadir nuevoBuscar
¡Sólo los usuarios registrados pueden escribir comentarios!

Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved.

 
< Anterior   Siguiente >
 
 

Encuesta

¿ Que opinas de nuestro nuevo diseño Web ?
 

Estan en Linea

Hay 5 invitados en línea