It really is quite trivial--in the form, I have the following:
<span style="display:none;">Leave This Field Blank</span>
<input type="text" name="username123" value="" style="display:none;">
and the processing page has this:
if((isset($_POST['username123']))&&($_POST['username123']=="")){
#This is most likely a valid entry: take appropriate actions
}
}else{
#This is most likely a bot: throw error message and
#stop application processing
}
As for the comment form generating a captcha after 20 minutes...
all you have to do is query the comment db to see how many comments this user has put in over a timespan--if it is greater than 30, include the captcha routine.