I don't think I quite understand what your usage scenario is. You want to prevent identical posts from being made to your phpBB forum in the same way the xkcd-signal bot prevents identical lines from being posted to an IRC channel? What sort of editing do you suspect you might want to do later?
If I was responsible for doing this, I would definitely do it with SQL. For one thing, posts are necessarily being written to the database anyway, so kludging together a flat file would require you to save every post twice. Secondly, looking up data is precisely what a database is designed to do and a database is likely to do a better at indexing that data for later lookup than you're likely to be able to do on your own. As an added advantage, using SQL means that you don't have to deal with situations where users edit or delete their posts; unlike IRC, a forum is not always a "post it and move on" medium. Finally, I don't know if your goal is to make a phpbb MOD out of this for release to the phpbb community, but if that is your intent, a SQL based solution will probably be far more portable and prevent you from getting emails complaining about installation problems and screwy edge case bugs.
As a final thought, and I'll say this for whichever solution you choose, I would suggest that phpbb-signal work on the basis of hashes of posts rather than on posts themselves. Over the long term, I suspect these will be a lot easier to manage. In a database, it's a lot easier to index a hash than it is a text blob, which means added lookup speed and better performance. In a flat file, it means you don't need to find some way to delimit posts from one another and a vastly simplified lookup algorithm, which will make your life a lot less messy.