Ignore:
Timestamp:
Mar 29, 2012, 8:48:09 PM (12 years ago)
Author:
rvelices
Message:

rv_akismet - added a technique to detect robots (as of today my tests show 100% spams caught) :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/rv_akismet/check.inc.php

    r7610 r13799  
    2121    'referrer' => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '',
    2222  );
     23  if (isset($_POST['url']) && strlen($_POST['url']))
     24    $aki_comm['comment_author_url'] = $_POST['url'];
    2325
    2426  $akismet = new Akismet(get_absolute_root_url(), $conf['akismet_api_key'], $aki_comm);
     
    3234      if ('reject'!=$action) set_status_header(403);
    3335      $counters[0]++;
     36      $_POST['cr'][] = 'aki';
    3437    }
     38    else
     39      $_POST['cr'][] = 'aki-ok';
    3540    $counters[1]++;
    3641    $conf['akismet_counters'] = implode('/', $counters);
     
    3843    pwg_query($query);
    3944  }
    40   elseif (is_admin())
    41     var_export( $akismet->getErrors() );
     45  else {
     46    $_POST['cr'][] = 'aki-FAIL';
     47    if (is_admin())
     48      var_export( $akismet->getErrors() );
     49  }
    4250
    4351  return $action;
Note: See TracChangeset for help on using the changeset viewer.