Monday August 26, 2002

Technical note: there are a few portions of the Jer Zone which are dynamically created, that is, which will often change for each person who reads the page. The list of recent weblogs on the right margin is one of them. A PHP script is triggered every fifteen minutes by a cron entry on the Linux host machine, the script gets the XML document from http://www.weblogs.com/changes.xml, parses it into a hash, looks for matching URLs and updates their timestamp in the database. It works well. The one shortcoming is that some of the weblogs don't "ping" weblogs.com when they update. I fixed that this weekend. Another cron triggered PHP script (four times a day) goes out and grabs the weblog page for each of these loners, strips off the markup, creates an MD5 checksum from some of the remaining text, compares that to the previous checksum, and updates the timestamp if they differ. The MD5 checksum is nice because only 32 bytes get stored in the database rather than a 1-8k chunk of text.