Guide in the Rotate Captcha project follow the instructions:

1. Complete the registration - rotatecaptcha.fun/registration/ Get the necessary values to configure.

2. Use the resulting ID value in the data-key. Send the page to the client, example:

<!DOCTYPE html>

<html>
<head>
  <meta charset="UTF-8">
  <script type="text/javascript" src="https://rotatecaptcha.fun/assets/js/captcha.js"></script> <!-- Specify for captcha --> 
</head>
<body>
  <div id="rotateCaptcha" data-key="1"></div> <!-- Specify for captcha - Your ID issued during registration -->

  <form action="#" method="POST" id="rotateForm"> <!-- Specify the tag <form id="rotateForm"> for the captcha and specify your structure -->

    <input type="text">
    <input type="submit" value="Next">

  </form>
</body>
</html>

3. Get the value passed by the client to the server - $_POST['successInput']. Make sure that the value is passed from your domain.

4. Send a POST request to - https://rotatecaptcha.fun/backend.php three parameters: key, verification, hash.

Key - is your ID
verification - is also issued during registration
hash - is $_POST['successInput']

5. In response, you will get a result, 1 - means a successful check.

6. Example for use on a server using the language PHP:


<?php

if(!empty($_POST['successInput'])) {

  $params['key'] = '';
  $params['verification'] = '';
  $params['hash'] = $_POST['successInput'];

  // The URL of the site where we send the POST request
  $url = 'https://rotatecaptcha.fun/backend.php';

  // Install context
  $options = array(
    'http' => array(
      'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
      'method'  => 'POST',
      'content' => http_build_query($params),
    ),
  );

  $context = stream_context_create($options);
  $result = file_get_contents($url, false, $context);
  

  if($result == 1) {
    echo "Successfully";
  } else {
    echo "Error";
  }
  
 
} else {
  echo "Missing value - successInput";
}

?>