Although I prefer the .htaccess method another way to do this is to use captcha which is supposed to differentiate between humans and bots.
More information on Wikipedia:
CAPTCHA - Wikipedia, the free encyclopedia
Maybe a combination of both?
Humous
--edit--
I should have mentioned captcha generates an image with a combination of letters and numbers which are layed out in perculiar patterns which a bot can't (shouldn't) read but a human can (should).