$comment['image_id']) ); unset_make_full_url(); $aki_comm = array( 'author' => $comment['author'], 'body' => $comment['content'], 'permalink' => $url, 'referrer' => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '', ); if (isset($_POST['url']) && strlen($_POST['url'])) $aki_comm['comment_author_url'] = $_POST['url']; $akismet = new Akismet(get_absolute_root_url(), $conf['akismet_api_key'], $aki_comm); if( !$akismet->errorsExist() ) { $counters = explode('/', $conf['akismet_counters']); if ( $akismet->isSpam() ) { $action = $conf['akismet_spam_action']; if ('reject'!=$action) set_status_header(403); $counters[0]++; $_POST['cr'][] = 'aki'; } else $_POST['cr'][] = 'aki-ok'; $counters[1]++; $conf['akismet_counters'] = implode('/', $counters); $query = 'UPDATE '.CONFIG_TABLE.' SET value="'.$conf['akismet_counters'].'" WHERE param="akismet_counters" LIMIT 1'; pwg_query($query); } else { $_POST['cr'][] = 'aki-FAIL'; if (is_admin()) var_export( $akismet->getErrors() ); } return $action; } ?>