Get Email when Googlebot Pays a Visit


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. if ( strpos( $_SERVER['HTTP_USER_AGENT'], ‘Googlebot’ ) !== false )
  3. {
  4. // Tu dirección de correo electrónico
  5. $email_address = "[email protected]";
  6.  
  7. // Envía el mensaje
  8. mail(
  9. $email_address,
  10. "Alerta de Googlebot",
  11. "El Googlebot ha visitado tu pagina: " . $_SERVER['REQUEST_URI']
  12. );
  13. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.