Spam protection, AntiSpam, FireWall by CleanTalk - Version 3.1

Version Description

2014-08-19 = * Added anti spam test over senders Cookies. * Improved form fill anti spam test. * Improved speed selection of the nearest server to website. * Improved anti spam speed for comments. * Relevance anti spam test disabled by default. To enable test should be used option 'relevance_test'.

Download this release

Release Info

Developer shagimuratov
Plugin Icon 128x128 Spam protection, AntiSpam, FireWall by CleanTalk
Version 3.1
Comparing to
See all releases

Code changes from version 2.59 to 3.1

Files changed (3) hide show
  1. cleantalk.class.php +29 -12
  2. cleantalk.php +105 -65
  3. readme.txt +11 -6
cleantalk.class.php CHANGED
@@ -2,11 +2,11 @@
2
  /**
3
  * Cleantalk base class
4
  *
5
- * @version 1.29
6
  * @package Cleantalk
7
  * @subpackage Base
8
- * @author Сleantalk team (welcome@cleantalk.ru)
9
- * @copyright (C) 2013 СleanTalk team (http://cleantalk.org)
10
  * @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
11
  * @see https://github.com/CleanTalk/php-antispam
12
  *
@@ -156,7 +156,7 @@ class CleantalkResponse {
156
  $this->errstr = $obj->errstr;
157
 
158
  $this->errstr = preg_replace("/.+(\*\*\*.+\*\*\*).+/", "$1", $this->errstr);
159
- // Разбираем ответ с клинтолка
160
  $this->stop_words = isset($obj->stop_words) ? utf8_decode($obj->stop_words) : null;
161
  $this->comment = isset($obj->comment) ? utf8_decode($obj->comment) : null;
162
  $this->blacklisted = (isset($obj->blacklisted)) ? $obj->blacklisted : null;
@@ -399,6 +399,12 @@ class Cleantalk {
399
  */
400
  public $ssl_on = false;
401
 
 
 
 
 
 
 
402
  /**
403
  * Function checks whether it is possible to publish the message
404
  * @param CleantalkRequest $request
@@ -707,7 +713,7 @@ class Cleantalk {
707
 
708
  $result = $this->sendRequest($msg, $url, $this->server_timeout);
709
  }
710
-
711
  if (($result === false || $result->errno != 0) && $this->stay_on_server == false) {
712
 
713
  // Split server url to parts
@@ -808,19 +814,31 @@ class Cleantalk {
808
  "ttl" => $this->server_ttl
809
  );
810
  } else {
811
-
812
- // $i - to resolve collisions with localhost and
813
  $i = 0;
814
  $r_temp = null;
 
815
  foreach ($response as $server) {
816
- $ping = $this->httpPing($server['ip']);
 
 
 
 
 
 
 
817
 
818
  // -1 server is down, skips not reachable server
819
- if ($ping != -1)
820
- $r_temp[$ping * 10000 + $i] = $server;
821
-
822
  $i++;
 
 
 
 
823
  }
 
824
  if (count($r_temp)){
825
  ksort($r_temp);
826
  $response = $r_temp;
@@ -940,7 +958,6 @@ class Cleantalk {
940
  $file = @fsockopen ($host, 80, $errno, $errstr, $this->server_timeout);
941
  $stoptime = microtime(true);
942
  $status = 0;
943
-
944
  if (!$file) {
945
  $status = -1; // Site is down
946
  } else {
2
  /**
3
  * Cleantalk base class
4
  *
5
+ * @version 1.30
6
  * @package Cleantalk
7
  * @subpackage Base
8
+ * @author Сleantalk team (welcome@cleantalk.org)
9
+ * @copyright (C) 2014 СleanTalk team (http://cleantalk.org)
10
  * @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
11
  * @see https://github.com/CleanTalk/php-antispam
12
  *
156
  $this->errstr = $obj->errstr;
157
 
158
  $this->errstr = preg_replace("/.+(\*\*\*.+\*\*\*).+/", "$1", $this->errstr);
159
+
160
  $this->stop_words = isset($obj->stop_words) ? utf8_decode($obj->stop_words) : null;
161
  $this->comment = isset($obj->comment) ? utf8_decode($obj->comment) : null;
162
  $this->blacklisted = (isset($obj->blacklisted)) ? $obj->blacklisted : null;
399
  */
400
  public $ssl_on = false;
401
 
402
+ /**
403
+ * Minimal server response in miliseconds to catch the server
404
+ *
405
+ */
406
+ public $min_server_timeout = 100;
407
+
408
  /**
409
  * Function checks whether it is possible to publish the message
410
  * @param CleantalkRequest $request
713
 
714
  $result = $this->sendRequest($msg, $url, $this->server_timeout);
715
  }
716
+
717
  if (($result === false || $result->errno != 0) && $this->stay_on_server == false) {
718
 
719
  // Split server url to parts
814
  "ttl" => $this->server_ttl
815
  );
816
  } else {
817
+ // $i - to resolve collisions with localhost
 
818
  $i = 0;
819
  $r_temp = null;
820
+ $fast_server_found = false;
821
  foreach ($response as $server) {
822
+
823
+ // Do not test servers because fast work server found
824
+ if ($fast_server_found) {
825
+ $ping = $this->min_server_timeout;
826
+ } else {
827
+ $ping = $this->httpPing($server['ip']);
828
+ $ping = $ping * 1000;
829
+ }
830
 
831
  // -1 server is down, skips not reachable server
832
+ if ($ping != -1) {
833
+ $r_temp[$ping + $i] = $server;
834
+ }
835
  $i++;
836
+
837
+ if ($ping < $this->min_server_timeout) {
838
+ $fast_server_found = true;
839
+ }
840
  }
841
+
842
  if (count($r_temp)){
843
  ksort($r_temp);
844
  $response = $r_temp;
958
  $file = @fsockopen ($host, 80, $errno, $errstr, $this->server_timeout);
959
  $stoptime = microtime(true);
960
  $status = 0;
 
961
  if (!$file) {
962
  $status = -1; // Site is down
963
  } else {
cleantalk.php CHANGED
@@ -3,14 +3,14 @@
3
  Plugin Name: Anti-spam by CleanTalk
4
  Plugin URI: http://cleantalk.org
5
  Description: Cloud antispam for comments, registrations and contacts. The plugin doesn't use CAPTCHA, Q&A, math, counting animals or quiz to stop spam bots.
6
- Version: 2.59
7
  Author: СleanTalk <welcome@cleantalk.ru>
8
  Author URI: http://cleantalk.org
9
  */
10
 
11
  define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
12
 
13
- $ct_agent_version = 'wordpress-259';
14
  $ct_plugin_name = 'Anti-spam by CleanTalk';
15
  $ct_checkjs_frm = 'ct_checkjs_frm';
16
  $ct_checkjs_register_form = 'ct_checkjs_register_form';
@@ -81,6 +81,9 @@ $ct_options = null;
81
  // Account status check last time
82
  $ct_account_status_check = 0;
83
 
 
 
 
84
  // Init action.
85
  add_action('init', 'ct_init', 1);
86
 
@@ -160,15 +163,25 @@ if (is_admin()) {
160
  * @return mixed[] Array of options
161
  */
162
  function ct_init() {
163
- global $ct_wplp_result_label, $ct_jp_comments, $ct_post_data_label, $ct_post_data_authnet_label;
164
 
165
  ct_init_session();
 
 
 
 
 
 
 
 
 
 
166
 
167
  add_action('comment_form', 'ct_comment_form');
168
 
169
  $jetpack_active_modules = get_option('jetpack_active_modules');
170
  if (
171
- (class_exists( 'Jetpack', false) && $jetpack_active_modules && in_array('comments', $jetpack_active_modules)) ||
172
  (defined('LANDINGPAGES_CURRENT_VERSION'))
173
  || (defined('WS_PLUGIN__S2MEMBER_PRO_VERSION'))
174
  || (defined('WOOCOMMERCE_VERSION'))
@@ -239,7 +252,8 @@ function ct_def_options() {
239
  'spam_store_days' => '31', // Days before delete comments from folder Spam
240
  'ssl_on' => 0, // Secure connection to servers
241
  'next_account_status_check' => 0, // Time label when the plugin should check account status
242
- 'user_token' => '' // User token
 
243
  );
244
  }
245
 
@@ -357,6 +371,32 @@ function ct_init_session() {
357
  return null;
358
  }
359
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
  /**
361
  * Inner function - Common part of request sending
362
  * @param array Array of parameters:
@@ -376,12 +416,8 @@ function ct_base_call($params = array()) {
376
 
377
  $submit_time = submit_time_test();
378
 
379
- $sender_info = array(
380
- 'cms_lang' => substr(get_locale(), 0, 2),
381
- 'REFFERRER' => @$_SERVER['HTTP_REFERER'],
382
- 'USER_AGENT' => @$_SERVER['HTTP_USER_AGENT'],
383
- );
384
- if(array_key_exists('sender_info', $params)){
385
  $sender_info = array_merge($sender_info, (array) $params['sender_info']);
386
  }
387
  $sender_info = json_encode($sender_info);
@@ -462,11 +498,10 @@ function ct_footer_add_cookie() {
462
  * @param int $post_id Post ID, not used
463
  */
464
  function ct_add_hidden_fields($post_id = null, $field_name = 'ct_checkjs', $return_string = false, $cookie_check = false) {
465
- global $ct_checkjs_def, $ct_formtime_label, $ct_plugin_name;
466
 
467
  $ct_checkjs_key = ct_get_checkjs_value();
468
 
469
- $_SESSION[$ct_formtime_label] = time();
470
 
471
  if ($cookie_check) {
472
  $html = '
@@ -540,15 +575,13 @@ function ct_is_user_enable() {
540
  * return null;
541
  */
542
  function ct_frm_entries_footer_scripts($fields, $form) {
543
- global $current_user, $ct_checkjs_frm, $ct_formtime_label;
544
 
545
  $options = ct_get_options();
546
  if ($options['contact_forms_test'] == 0) {
547
  return false;
548
  }
549
 
550
- $_SESSION[$ct_formtime_label] = time();
551
-
552
  $ct_checkjs_key = ct_get_checkjs_value();
553
  $ct_frm_name = 'form_' . $form->form_key;
554
 
@@ -697,10 +730,6 @@ function ct_preprocess_comment($comment) {
697
 
698
  $comment_post_id = $comment['comment_post_ID'];
699
 
700
- $post = get_post($comment_post_id);
701
-
702
- $example = null;
703
-
704
  $sender_info = array(
705
  'sender_url' => @$comment['comment_author_url']
706
  );
@@ -717,28 +746,32 @@ function ct_preprocess_comment($comment) {
717
  }
718
 
719
  $post_info['post_url'] = ct_post_url(null, $comment_post_id);
720
-
721
  $post_info = json_encode($post_info);
722
- if ($post_info === false)
723
- $post_info = '';
724
-
725
- if ($post !== null){
726
- $example['title'] = $post->post_title;
727
- $example['body'] = $post->post_content;
728
- $example['comments'] = null;
729
-
730
- $last_comments = get_comments(array('status' => 'approve', 'number' => 10, 'post_id' => $comment_post_id));
731
- foreach ($last_comments as $post_comment){
732
- $example['comments'] .= "\n\n" . $post_comment->comment_content;
733
- }
734
-
735
- $example = json_encode($example);
736
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
737
 
738
- // Use plain string format if've failed with JSON
739
- if ($example === false || $example === null){
740
- $example = ($post->post_title !== null) ? $post->post_title : '';
741
- $example .= ($post->post_content !== null) ? "\n\n" . $post->post_content : '';
 
742
  }
743
 
744
  $ct_base_call_result = ct_base_call(array(
@@ -1152,15 +1185,11 @@ function ct_registration_errors($errors, $sanitized_user_login = null, $user_ema
1152
 
1153
  require_once('cleantalk.class.php');
1154
 
1155
- $blog_lang = substr(get_locale(), 0, 2);
1156
- $user_info = array(
1157
- 'cms_lang' => $blog_lang,
1158
- 'REFFERRER' => @$_SERVER['HTTP_REFERER'],
1159
- 'USER_AGENT' => @$_SERVER['HTTP_USER_AGENT'],
1160
- );
1161
- $user_info = json_encode($user_info);
1162
- if ($user_info === false)
1163
- $user_info = '';
1164
 
1165
  $sender_email = $user_email;
1166
 
@@ -1169,6 +1198,7 @@ function ct_registration_errors($errors, $sanitized_user_login = null, $user_ema
1169
  $ct = new Cleantalk();
1170
  $ct->work_url = $config['ct_work_url'];
1171
  $ct->server_url = $options['server'];
 
1172
  $ct->server_ttl = $config['ct_server_ttl'];
1173
  $ct->server_changed = $config['ct_server_changed'];
1174
  $ct->ssl_on = $options['ssl_on'];
@@ -1179,7 +1209,7 @@ function ct_registration_errors($errors, $sanitized_user_login = null, $user_ema
1179
  $ct_request->sender_ip = $ct->ct_session_ip($_SERVER['REMOTE_ADDR']);
1180
  $ct_request->sender_nickname = $sanitized_user_login;
1181
  $ct_request->agent = $ct_agent_version;
1182
- $ct_request->sender_info = $user_info;
1183
  $ct_request->js_on = $checkjs;
1184
  $ct_request->submit_time = $submit_time;
1185
 
@@ -1491,7 +1521,7 @@ function ct_si_contact_form_validate($form_errors = array(), $form_id_num = 0) {
1491
  function ct_comment_text($comment_text) {
1492
  global $comment, $ct_approved_request_id_label;
1493
 
1494
- if (isset($_COOKIE[$ct_approved_request_id_label])) {
1495
  $ct_hash = get_comment_meta($comment->comment_ID, 'ct_hash', true);
1496
 
1497
  if ($ct_hash !== '' && $_COOKIE[$ct_approved_request_id_label] == $ct_hash) {
@@ -1581,16 +1611,12 @@ function ct_s2member_registration_test() {
1581
  $checkjs = js_test('ct_checkjs', $_COOKIE);
1582
 
1583
  require_once('cleantalk.class.php');
1584
-
1585
- $blog_lang = substr(get_locale(), 0, 2);
1586
- $user_info = array(
1587
- 'cms_lang' => $blog_lang,
1588
- 'REFFERRER' => @$_SERVER['HTTP_REFERER'],
1589
- 'USER_AGENT' => @$_SERVER['HTTP_USER_AGENT'],
1590
- );
1591
- $user_info = json_encode($user_info);
1592
- if ($user_info === false)
1593
- $user_info = '';
1594
 
1595
  $sender_email = null;
1596
  if (isset($_POST[$ct_post_data_label]['email']))
@@ -1622,7 +1648,7 @@ function ct_s2member_registration_test() {
1622
  $ct_request->sender_ip = $ct->ct_session_ip($_SERVER['REMOTE_ADDR']);
1623
  $ct_request->sender_nickname = $sender_nickname;
1624
  $ct_request->agent = $ct_agent_version;
1625
- $ct_request->sender_info = $user_info;
1626
  $ct_request->js_on = $checkjs;
1627
  $ct_request->submit_time = $submit_time;
1628
 
@@ -1647,9 +1673,23 @@ function ct_s2member_registration_test() {
1647
  return true;
1648
  }
1649
 
1650
- function ct_woocommerce_register_post ($username, $email, $validation_errors) {
1651
- var_dump($username, $email); exit;
1652
- return $validation_errors;
1653
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1654
 
1655
  ?>
3
  Plugin Name: Anti-spam by CleanTalk
4
  Plugin URI: http://cleantalk.org
5
  Description: Cloud antispam for comments, registrations and contacts. The plugin doesn't use CAPTCHA, Q&A, math, counting animals or quiz to stop spam bots.
6
+ Version: 3.1
7
  Author: СleanTalk <welcome@cleantalk.ru>
8
  Author URI: http://cleantalk.org
9
  */
10
 
11
  define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
12
 
13
+ $ct_agent_version = 'wordpress-31';
14
  $ct_plugin_name = 'Anti-spam by CleanTalk';
15
  $ct_checkjs_frm = 'ct_checkjs_frm';
16
  $ct_checkjs_register_form = 'ct_checkjs_register_form';
81
  // Account status check last time
82
  $ct_account_status_check = 0;
83
 
84
+ // Post without page load
85
+ $ct_direct_post = 0;
86
+
87
  // Init action.
88
  add_action('init', 'ct_init', 1);
89
 
163
  * @return mixed[] Array of options
164
  */
165
  function ct_init() {
166
+ global $ct_wplp_result_label, $ct_jp_comments, $ct_post_data_label, $ct_post_data_authnet_label, $ct_formtime_label, $ct_direct_post;
167
 
168
  ct_init_session();
169
+
170
+ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
171
+ if (!array_key_exists($ct_formtime_label, $_SESSION) && session_id() != '') {
172
+ $ct_direct_post = 1;
173
+ }
174
+ } else {
175
+ $_SESSION[$ct_formtime_label] = time();
176
+ }
177
+
178
+ ct_cookies_test();
179
 
180
  add_action('comment_form', 'ct_comment_form');
181
 
182
  $jetpack_active_modules = get_option('jetpack_active_modules');
183
  if (
184
+ (class_exists('Jetpack', false) && $jetpack_active_modules && in_array('comments', $jetpack_active_modules)) ||
185
  (defined('LANDINGPAGES_CURRENT_VERSION'))
186
  || (defined('WS_PLUGIN__S2MEMBER_PRO_VERSION'))
187
  || (defined('WOOCOMMERCE_VERSION'))
252
  'spam_store_days' => '31', // Days before delete comments from folder Spam
253
  'ssl_on' => 0, // Secure connection to servers
254
  'next_account_status_check' => 0, // Time label when the plugin should check account status
255
+ 'user_token' => '', // User token
256
+ 'relevance_test' => 0 // Test comment for relevance
257
  );
258
  }
259
 
371
  return null;
372
  }
373
 
374
+ /**
375
+ * Cookies test for sender
376
+ * @return null|0|1;
377
+ */
378
+ function ct_cookies_test ($test = false) {
379
+ $cookie_label = 'ct_cookies_test';
380
+ $secret_hash = ct_get_checkjs_value();
381
+
382
+ $result = null;
383
+ if (isset($_COOKIE[$cookie_label])) {
384
+ if ($_COOKIE[$cookie_label] == $secret_hash) {
385
+ $result = 1;
386
+ } else {
387
+ $result = 0;
388
+ }
389
+ } else {
390
+ setcookie($cookie_label, $secret_hash, 0, '/');
391
+
392
+ if ($test) {
393
+ $result = 0;
394
+ }
395
+ }
396
+
397
+ return $result;
398
+ }
399
+
400
  /**
401
  * Inner function - Common part of request sending
402
  * @param array Array of parameters:
416
 
417
  $submit_time = submit_time_test();
418
 
419
+ $sender_info = get_sender_info();
420
+ if (array_key_exists('sender_info', $params)) {
 
 
 
 
421
  $sender_info = array_merge($sender_info, (array) $params['sender_info']);
422
  }
423
  $sender_info = json_encode($sender_info);
498
  * @param int $post_id Post ID, not used
499
  */
500
  function ct_add_hidden_fields($post_id = null, $field_name = 'ct_checkjs', $return_string = false, $cookie_check = false) {
501
+ global $ct_checkjs_def, $ct_plugin_name;
502
 
503
  $ct_checkjs_key = ct_get_checkjs_value();
504
 
 
505
 
506
  if ($cookie_check) {
507
  $html = '
575
  * return null;
576
  */
577
  function ct_frm_entries_footer_scripts($fields, $form) {
578
+ global $current_user, $ct_checkjs_frm;
579
 
580
  $options = ct_get_options();
581
  if ($options['contact_forms_test'] == 0) {
582
  return false;
583
  }
584
 
 
 
585
  $ct_checkjs_key = ct_get_checkjs_value();
586
  $ct_frm_name = 'form_' . $form->form_key;
587
 
730
 
731
  $comment_post_id = $comment['comment_post_ID'];
732
 
 
 
 
 
733
  $sender_info = array(
734
  'sender_url' => @$comment['comment_author_url']
735
  );
746
  }
747
 
748
  $post_info['post_url'] = ct_post_url(null, $comment_post_id);
 
749
  $post_info = json_encode($post_info);
750
+ if ($post_info === false) {
751
+ $post_info = '';
 
 
 
 
 
 
 
 
 
 
 
 
752
  }
753
+
754
+ $example = null;
755
+ if ($options['relevance_test']) {
756
+ $post = get_post($comment_post_id);
757
+ if ($post !== null){
758
+ $example['title'] = $post->post_title;
759
+ $example['body'] = $post->post_content;
760
+ $example['comments'] = null;
761
+
762
+ $last_comments = get_comments(array('status' => 'approve', 'number' => 10, 'post_id' => $comment_post_id));
763
+ foreach ($last_comments as $post_comment){
764
+ $example['comments'] .= "\n\n" . $post_comment->comment_content;
765
+ }
766
+
767
+ $example = json_encode($example);
768
+ }
769
 
770
+ // Use plain string format if've failed with JSON
771
+ if ($example === false || $example === null){
772
+ $example = ($post->post_title !== null) ? $post->post_title : '';
773
+ $example .= ($post->post_content !== null) ? "\n\n" . $post->post_content : '';
774
+ }
775
  }
776
 
777
  $ct_base_call_result = ct_base_call(array(
1185
 
1186
  require_once('cleantalk.class.php');
1187
 
1188
+ $sender_info = get_sender_info();
1189
+ $sender_info = json_encode($sender_info);
1190
+ if ($sender_info === false) {
1191
+ $sender_info= '';
1192
+ }
 
 
 
 
1193
 
1194
  $sender_email = $user_email;
1195
 
1198
  $ct = new Cleantalk();
1199
  $ct->work_url = $config['ct_work_url'];
1200
  $ct->server_url = $options['server'];
1201
+
1202
  $ct->server_ttl = $config['ct_server_ttl'];
1203
  $ct->server_changed = $config['ct_server_changed'];
1204
  $ct->ssl_on = $options['ssl_on'];
1209
  $ct_request->sender_ip = $ct->ct_session_ip($_SERVER['REMOTE_ADDR']);
1210
  $ct_request->sender_nickname = $sanitized_user_login;
1211
  $ct_request->agent = $ct_agent_version;
1212
+ $ct_request->sender_info = $sender_info;
1213
  $ct_request->js_on = $checkjs;
1214
  $ct_request->submit_time = $submit_time;
1215
 
1521
  function ct_comment_text($comment_text) {
1522
  global $comment, $ct_approved_request_id_label;
1523
 
1524
+ if (isset($_COOKIE[$ct_approved_request_id_label]) && isset($comment->comment_ID)) {
1525
  $ct_hash = get_comment_meta($comment->comment_ID, 'ct_hash', true);
1526
 
1527
  if ($ct_hash !== '' && $_COOKIE[$ct_approved_request_id_label] == $ct_hash) {
1611
  $checkjs = js_test('ct_checkjs', $_COOKIE);
1612
 
1613
  require_once('cleantalk.class.php');
1614
+
1615
+ $sender_info = get_sender_info();
1616
+ $sender_info = json_encode($sender_info);
1617
+ if ($sender_info === false) {
1618
+ $sender_info= '';
1619
+ }
 
 
 
 
1620
 
1621
  $sender_email = null;
1622
  if (isset($_POST[$ct_post_data_label]['email']))
1648
  $ct_request->sender_ip = $ct->ct_session_ip($_SERVER['REMOTE_ADDR']);
1649
  $ct_request->sender_nickname = $sender_nickname;
1650
  $ct_request->agent = $ct_agent_version;
1651
+ $ct_request->sender_info = $sender_info;
1652
  $ct_request->js_on = $checkjs;
1653
  $ct_request->submit_time = $submit_time;
1654
 
1673
  return true;
1674
  }
1675
 
1676
+ /**
1677
+ * Inner function - Default data array for senders
1678
+ * @return array
1679
+ */
1680
+ function get_sender_info() {
1681
+ global $ct_direct_post;
1682
+
1683
+ $php_session = session_id() != '' ? 1 : 0;
1684
+
1685
+ return $sender_info = array(
1686
+ 'cms_lang' => substr(get_locale(), 0, 2),
1687
+ 'REFFERRER' => @$_SERVER['HTTP_REFERER'],
1688
+ 'USER_AGENT' => @$_SERVER['HTTP_USER_AGENT'],
1689
+ 'php_session' => $php_session,
1690
+ 'cookies_enabled' => ct_cookies_test(true),
1691
+ 'direct_post' => $ct_direct_post,
1692
+ );
1693
+ }
1694
 
1695
  ?>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: znaeff, shagimuratov
3
  Tags: antispam, anti-spam, anti spam, spam, spammers, captcha, comments, registration, contact form, blacklist, math, signup, formidable, bot, spam bots, spammy, s2member, wordpress, support, BuddyPress, bbpress, landing pages, fast secure contact form, WooCommerce, jetpack, cf7, form
4
  Requires at least: 3.0
5
  Tested up to: 4.0
6
- Stable tag: 2.59
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -149,10 +149,12 @@ WordPress 3.0 at least. PHP 4, 5 with CURL or file_get_contents() function and e
149
  1. Anti spam stopped spam bot at the registration form.
150
 
151
  == Changelog ==
152
- = 2.59 2014-08-14 =
153
- * Added antispam protection for bbPress guests toptics/replies.
154
- * Improved antispam protection for JComments comment form.
155
- * Updated PHP API. Now the plugin can resolve senders IP via proxies chain. The plugin uses first IP address from chain.
 
 
156
 
157
  = 2.58 2014-08-06 =
158
  * Added anti spam protection for signups posted via WooCommerce order form.
@@ -378,8 +380,11 @@ WordPress 3.0 at least. PHP 4, 5 with CURL or file_get_contents() function and e
378
  * First version
379
 
380
  == Upgrade Notice ==
 
 
 
381
  = 2.59 2014-08-14 =
382
- Antispam protection for bbPress guests posts. Improvement for JetPack comments and PHP API update.
383
 
384
  = 2.58 2014-08-06 =
385
  * Added anti spam protection for signups posted via WooCommerce order form.
3
  Tags: antispam, anti-spam, anti spam, spam, spammers, captcha, comments, registration, contact form, blacklist, math, signup, formidable, bot, spam bots, spammy, s2member, wordpress, support, BuddyPress, bbpress, landing pages, fast secure contact form, WooCommerce, jetpack, cf7, form
4
  Requires at least: 3.0
5
  Tested up to: 4.0
6
+ Stable tag: 3.1
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
149
  1. Anti spam stopped spam bot at the registration form.
150
 
151
  == Changelog ==
152
+ = 3.1 2014-08-19 =
153
+ * Added anti spam test over senders Cookies.
154
+ * Improved form fill anti spam test.
155
+ * Improved speed selection of the nearest server to website.
156
+ * Improved anti spam speed for comments.
157
+ * Relevance anti spam test disabled by default. To enable test should be used option 'relevance_test'.
158
 
159
  = 2.58 2014-08-06 =
160
  * Added anti spam protection for signups posted via WooCommerce order form.
380
  * First version
381
 
382
  == Upgrade Notice ==
383
+ = 3.1 2014-08-19 =
384
+ Major changes for comments antispam logic. Improved plugin speed.
385
+
386
  = 2.59 2014-08-14 =
387
+ Antispam protection for bbPress guests posts. Improvement for JetPack comments and PHP API update.
388
 
389
  = 2.58 2014-08-06 =
390
  * Added anti spam protection for signups posted via WooCommerce order form.