« PHP FUD is getting annoying now | Main | Merry Christmas »

Movable Type Comment And Trackback Closing Script (PHP)

I've hacked together a script which closes commenting and allowing trackback pings to blog entries that are older than 15 days. You can view it over here.

This is a early christmas present. It was written using PHP and PEAR DB (which should be in your include_path).

I was trying to get Kasia's perl based comment closing script to work but it did not and I was not in the mood for perl a few days ago and I hacked up the following php script.

It's been done by others before (Jeremy has it on his blog, mine is better cause it's longer!) but in the spirit of "not invented here" I wrote my own script which closes MT entries to comments and pings.

The idea is to cron it and forget about it and it has worked in that capacity well enough for the last few weeks.. so if anyone wants to use it (or they just like to amuse themselves by reading perl written by a Java programmer) the code is available here.

Remember you need to change the database connection details and you are good to do.