File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff 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
5866For example add die block for spam.
You can’t perform that action at this time.
0 commit comments