A quick, simple but effective spam filter for Twitter direct messages using the PHP Wrapper for Twitter by J7mbo
Edit the top of the cleandm.php file by adding your own spammy phrases and editing/removing existing ones.
You will need to register your own Twitter app at dev.twitter.com. It's really easy. Full instructions here- http://iag.me/socialmedia/how-to-create-a-twitter-app-in-8-easy-steps/
Upload cleandm.php and TwitterAPIExchange.php to your website. Run cleandm.php to delete your spammy direct messages. You could run this on a schedule.
Please note- your Twitter app credentials are stored in clear text. This is not very secure. The point of this app is to show a quick and easy way to delete your direct messages