Skip to content

Commit ce57a26

Browse files
committed
Upd. Readme about new additional parameter event_token_enabled updated.
1 parent a705354 commit ce57a26

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,26 @@ composer require cleantalk/php-antispam
4141

4242
### Step 2 - add CleantalkAntispam handler (middleware/interception) to your form handler (action)
4343

44-
```php
44+
```php linenums="1"
4545
$apikey = ''; // get it here cleantalk.org (free trial)
4646
$email_field = $_POST['email']; // get it from your form
4747
$cleantalk_antispam = new CleantalkAntispam($apikey, $email_field);
48+
// Additional parameters here
4849
$api_result = $cleantalk_antispam->handle();
4950
```
5051

5152
### Step 2.1 - add js lib to your html template
53+
_Need for gathering frontend data._
5254
```html
5355
<script src="https://moderate.cleantalk.org/ct-bot-detector-wrapper.js" defer></script>
5456
```
55-
_Need for gathering frontend data._
57+
and do not forget to add additional parameter to the request
58+
```php linenums="3"
59+
...
60+
// Additional parameters here
61+
$cleantalk_antispam->setEventTokenEnabled(1);
62+
...
63+
```
5664

5765
### Step 3 - do whatever you want with cloud result
5866
For example add die block for spam.

0 commit comments

Comments
 (0)