Rory Jaffe's blog

One-Line Script to Refresh a Web Site Cache by Spidering all Sitemap Entries

Well, the title says it all. I wanted to refresh my web site’s page cache, as some pages are very slow loading otherwise. The site can (with the Drupal Boost module) serve pages without having to reconstruct them if they are in the cache.

After some digging around and consolidating information from a number of sources, I came up with the following that reads the xml sitemap for the site then checks each page without downloading it. Remember to replace www. with the correct URL for your sitemap.

Armação dos Búzios

In the winter, Armação dos Búzios is a quiet beach resort made famous by Brigitte Bardot (one of the pictures below is her statue). Apparently it is shoulder-to-shoulder packed in the summer. They call it the Saint-Tropez of South America. Heavily visited by South Americans (including plenty of Brazilians); very few from the USA. If you don't know some Portuguese, you’ll have to learn quickly—few people speak any English.

Displaying weather XML from NOAA using PHP and XSLT

NOAA now has XML feeds with weather forecasts based upon your latitude and longitude—allowing you to get a forecast much closer to your house if you wish. The URL is http://forecast., where you substitute your own latitude and longitude for those in the example.

Simple Accessible CAPTCHA in PHP

In just a few lines of PHP code, this CAPTCHA will allow you to block most spambots. I developed this after some spammers discovered this web site’s contact form. There already were protections to avoid certain exploits (e. g., hijacking the form to send spam to third parties), but they still were able to send me spam emails.


Subscribe to RSS - Rory Jaffe's blog