I have written software to do this (unix only version so far).
Trapdoor Delux includes the script you refer to although not quoted in the text since the deluxe version automatically optimises the page.
If you are interested, quote 'deadlock' and i'll give 50% discount to all that would like it.
The main issue is with moitoring the search engine spiders. These change and new ones are added daily. We keep upto date with all the new spiders/robots and update all our registered users as and when we find new spiders.
Keep up the good work deadlock