Blocking Unwanted Blog Spammers (Linux/PHP/Scripting)

Lizardbones wrote

I use WordPress as my blog engine, and the plugin Akismet blocks most of the spam from my blog – so my (possibly) tens of fans never see it. However, this blog spam is still using my bandwidth, using my processing power for storing their spam comments, etc. I?ve been toying with a way to block the people or machines who are repeatedly posting blog spam. Well, here?s how to do it (so far).