ITS UP 2 U Information HomeContact
Log inRegister
  • Home
  • Contact

  • Register

Home

  • « locksmith keywords and my locksmith sites
  • The Lockout Drilling Scam »

Email you when Googlebot or Bingbot crawls your website

A php script that will email you when Googlebot or Bingbot crawls your website

Copy and Paste any or both scripts below into your "index.php" file that is in your Joomla template folder.

Below is for Googlebot to Email you:

<?php
if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Googlebot' ) !== false )
{
// paste your email address here
$my_email = 'sample@sample.com';
$today = date("F j, Y, g:ia"); 
// notify via email
mail($my_email,'[Notification] Googlebot Visit ' . $_SERVER['SERVER_NAME'], $today . ' - Googlebot has just visited '. $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'] . ' your website: ' . $_SERVER['REQUEST_URI'] );
}
?>

 

Below is for Googlebot to Write to a File:

<?php
if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Googlebot' ) !== false ) {
    file_put_contents('Googlebot.txt', 'Googlebot was here - ' . date(DATE_RFC822));
}
?>

 

OR

 

<?php
if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Googlebot' ) !== false )
{
$myfile = fopen("Googlebot.txt", "a+") or die("Unable to open file!");
$hasjustvisited = $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'] . ' your website: ' . $_SERVER['REQUEST_URI'];
$todate = date('M j, Y g:ia') . " ";
$googlewashere = ' Googlebot was here - ' ;
$googlefiles = $googlewashere . $todate . $hasjustvisited; 
fwrite($myfile, $googlefiles . "\n");
fclose($myfile);
}
?>

 ===================================================

 

Below is for Bingbot:

<?php
if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Bingbot' ) !== false )
{
// paste your email address here
$my_email = 'sample@sample.com';
$today = date("F j, Y, g:ia"); 
// notify via email
mail($my_email,'[Notification] Bingbot Visit ' . $_SERVER['SERVER_NAME'], $today . ' - Bingbot has just visited '. $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'] . ' your website: ' . $_SERVER['REQUEST_URI'] );
}
?>

 

OR

 

<?php
if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Bingbot' ) !== false )
{
$myfile = fopen("Bingbot.txt", "a+") or die("Unable to open file!");
$hasjustvisited = $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'] . ' your website: ' . $_SERVER['REQUEST_URI'];
$todate = date('M j, Y g:ia') . " ";
$bingwashere = ' Bingbot was here - ' ;
$bingfiles = $bingwashere . $todate . $hasjustvisited; 
fwrite($myfile, $googlefiles . "\n");
fclose($myfile);
}
?>

 

No feedback yet


Form is loading...

Search

Categories

Home

  • General
  • Hacks
  • How To
  • Tips n Tricks
  • Videos

Recent Posts

  • How to Remove Jomres Syndication Network Listings
  • Emergency Roadside Assistance
  • Apache Shell SSH - Search & Replace a Name in Files
  • Apache Shell SSH - Search for a Name in ALL Files
  • How To Unlock The Kwikset Bedroom / Bathroom Lock with a Paper Clip
  • Swimming Pool Inspections
  • Learn the Fox Trot: Father of Bride and Bride 1st Dance
  • How to update Joomla 2.5.27 to 3.8.2
  • How to remove b2evolution logo and links in footer
  • Fix Joomla Google Structured Data Article Errors
  • locksmith keywords and my locksmith sites
  • Email you when Googlebot or Bingbot crawls your website
  • The Lockout Drilling Scam
  • How To Make Your Own Jomres Plugin Manager
  • Intellectual property codes

Contact • Help

© 2021 ITS UP 2 U Information.All rights reserved.