Puoi iniziare con questi articoli:

http://www.codewalkers.com/c/a/Misce...TCHA-with-PHP/
http://www.encaps.net/software/php-captcha/
http://www.webcheatsheet.com/PHP/cre...protection.php

Oppure scaricare uno dei tanti script gia' pronti e guardare gli esempi forniti.