Skip to content

Commit af42298

Browse files
committed
Update. Logic. Remove submit_time parameter.
1 parent 82dbb89 commit af42298

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

example.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
3737
$ct_request->example = str_repeat('Just text ', 10);
3838
$ct_request->agent = 'php-api';
3939
$ct_request->sender_ip = '178.32.183.43';
40-
$ct_request->js_on = 1; # Site visitor has JavaScript
41-
$ct_request->submit_time = 12; # Seconds from start form filling till the form POST
40+
$ct_request->event_token = isset($_POST['ct_bot_detector_event_token']) ? $_POST['ct_bot_detector_event_token'] : null;
4241

4342
$ct = new Cleantalk();
4443
$ct->server_url = $config_url;

lib/CleantalkAntispam.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ public function handle()
4545
$ct_request->sender_ip = $sender_ip;
4646
$ct_request->sender_nickname = $sender_nickname;
4747
$ct_request->message = $message;
48-
$ct_request->submit_time = time() - (int) $_SESSION['ct_submit_time'];
4948
$ct_request->event_token = isset($_POST['ct_bot_detector_event_token']) ? $_POST['ct_bot_detector_event_token'] : null;
5049

5150
$ct = new Cleantalk();

0 commit comments

Comments
 (0)