PHP code example of truecastdesign / spamless

1. Go to this page and download the library: Download truecastdesign/spamless library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

truecastdesign / spamless example snippets


# composer autoloader
\Spamless(['name'=>'My Name', 'message'=>'This is a message', 'phone'=>'This value is not checked']);

# 'check' should be passed the value keys you want to check
# 'tests' should be passed the tests to perform

if ($Spam->tests(['gibberish','uppercase','underscores','keywords','russian','url','html','salesEmail'])->check(['name','phone', 'message'])) {
	echo 'valid';
} else {
	echo 'not valid: ';
	print_r($Spam->errors());
}