Autor Tema: Saber cuando te indexó un buscador!!!  (Leído 2890 veces)

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

Desconectado sortux

  • -^- Elite Silver -^-
  • Sv Full Member
  • *
  • Mensajes: 854
  • Si kieres Paz, prepárate para la Guerra!!!
    • \"
Saber cuando te indexó un buscador!!!
« : agosto 24, 2006, 10:59:02 am »
Bueno este pequeño script lo ke hace es enviarte un mail cuando un buscador te ha indexado, esto seria por medio de las funciones de PHP $HTTP_USER_AGENT y $QUERY_STRING.

en este ejemplo utilizo san google por obvias razones

Código: [Seleccionar]
<?php
  
if(eregi("Googlebot",$HTTP_USER_AGENT)){
       if (
$QUERY_STRING != ""){
            
$url "http://".$SERVER_NAME.$PHP_SELF.'?'.$QUERY_STRING;
       }else{
            
$url "http://".$SERVER_NAME.$PHP_SELF;
       }
  
$today date("j/m/Y, g:i a");

  
mail("webmaster@tudominio.com""Se ha detectado un robot de Google en http://$SERVER_NAME""$today - Google ha indexado la página $url.\n");
  }

  
?>

este script debe ir en todas las paginas ke keramos, bastaria con usar la funcion include.

si kieren utilizar otro robot, hay un listado por aki:
Código: [Seleccionar]
http://www.robotstxt.org/wc/active/html/index.html
There are only 10 types people in the world: Those who understand binary and those who don't

[img alt="some alt text"]http://ubuntucounter.geekosophical.net/img/ubuntu-user2.php?user=4815