'; } function check_MDFive($approved) { global $_POST; global $extra; if( $_POST['cache'] == md5(date(YmdH).$extra) || $_POST['cache'] == md5(date('YmdH',mktime(date(H)-1, 0, 0, date(m),date(d),date(Y))).$extra) ) { //good! within the cache window! } else { $badCount++; } if($badCount > 0) { die("We don't allow comment spam here."); return false; } else { return $approved; } } add_action('comment_form', 'gen_MDFive'); add_action('pre_comment_approved', 'check_MDFive'); ?>