If your site is plagued with unwanted spam, spammers, and bots, do yourself a huge favour and look at ZB Block
This php security script is designed to detect certain behaviours detrimental to websites, or known bad addresses attempting to access your site.
Kubuntu Forums . Net has been protected by ZB Block since November 12, 2012, resulting in spam, spammers, and bad bots being as rare as hens teeth.
ZB Block -- What Raid is to roaches, ZB Block is to Internet undesirables.