Fields with * are mandatory

Dios - Do It Open Source
 

safeNoCaptcha

SafeNoCaptcha

SafeNoCaptcha - is a php class, used to check if a form submission is made by a human or by a bot. Everybody hate to use captcha. Using SafeNoCaptcha, will not be neccesary to use captcha to your form.

As you can see on this website, I don't use captcha. Isn't this lovely?

How to use?

There are 2 public methods:
  • setToken() - used to set the value of a hidden field in your form
  • checkToken() - before process the form, call this function. If return is true, then user is human, else is a bot and you will reject the process of form.

include_once('SafeNoCaptcha.php');
$snc = new SafeNoCaptcha(
                100,
                'secretWord',
                'Process has been stopped. Too long. Your message wasn\'t sent.',
                'Process has been stopped. Look to be a suspicious process. Your message wasn\'t sent.',
                'tokenName'
            );
In your form:
<form>
      <input type="hidden" name="tokenName" value="$snc->setToken()" />
     .......
</form>
Before process the form, we check if is human:
if ($snc->checkToken()){
  //process the form
}else{
   return false;
}






Add comment
Citation will be added automatically at the top of your message!