Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Using content-check.pl to monitor a Drupal site

Parent Feed: 

One of the scripts in my bag of tools to check whether a site is still up and running is content-check.pl. This little script compares the hash of a web page against a previously created reference hash. If the content of the web page has modified, this script will detect it and send an email.

You have to be very careful which page you check because even the slightest difference in the HTML source will be detected.

In Drupal you should not use any page that contains a form because each time the form is rendered a unique form id is generated and inserted into the HTML. This results in a different page hash and will cause the script to send an warning email.

Keep in mind that, if you have enabled the User login block, each page contains a small login form and is not a good candidate for monitoring through content-check.pl. You might have to resort to monitoring your update.php file instead.

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web