Friendly, easy, lightweight, self-hostable CAPTCHA service. https://captcheck.netsyms.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.php 705B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. header("Content-Type: text/plain");
  3. var_dump($_POST);
  4. $url = 'https://captcheck.netsyms.com/api.php';
  5. $data = [
  6. 'session_id' => $_POST['captcheck_session_code'],
  7. 'answer_id' => $_POST['captcheck_selected_answer'],
  8. 'action' => "verify"
  9. ];
  10. $options = [
  11. 'http' => [
  12. 'header' => "Content-type: application/x-www-form-urlencoded\r\n",
  13. 'method' => 'POST',
  14. 'content' => http_build_query($data)
  15. ]
  16. ];
  17. $context = stream_context_create($options);
  18. $result = file_get_contents($url, false, $context);
  19. $resp = json_decode($result, TRUE);
  20. if (!$resp['result']) {
  21. exit("\n\nCAPTCHA did not verify:" . $resp['msg']);
  22. } else {
  23. exit("\n\nCAPTCHA verified!");
  24. }