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.

index.html 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <!DOCTYPE html>
  2. <meta charset=utf-8>
  3. <meta content="width=device-width,initial-scale=1" name=viewport>
  4. <title>Captcheck</title>
  5. <link rel="stylesheet" href="https://static.netsyms.net/bootstrap/4/bootstrap.minty.min.css" />
  6. <link rel="stylesheet" href="https://static.netsyms.net/prism/prism.css" />
  7. <script async src="https://static.netsyms.net/fontawesome/5.2/js/all.min.js"></script>
  8. <script defer async src="https://static.netsyms.net/prism/prism.js"></script>
  9. <style>
  10. h2, h3, p {
  11. text-align: center;
  12. }
  13. pre {
  14. padding-left: 5px;
  15. }
  16. @media only screen and (min-width: 768px) and (max-width: 991px) {
  17. h2, h3 {
  18. text-align: left;
  19. }
  20. .site-icon {
  21. margin-top: 18px;
  22. }
  23. }
  24. @media only screen and (min-width: 992px) and (max-width: 1199px) {
  25. h2, h3 {
  26. text-align: left;
  27. }
  28. .site-icon {
  29. margin-top: 14px;
  30. }
  31. }
  32. @media only screen and (min-width: 1200px) {
  33. h2, h3 {
  34. text-align: left;
  35. }
  36. .site-icon {
  37. margin-top: 0px;
  38. }
  39. }
  40. </style>
  41. <div class="container">
  42. <div class="card">
  43. <div class="card-body">
  44. <div class="row">
  45. <div class="col-12" style="text-align: center;" >
  46. <img src="logo.png" class="site-icon" style="width: 400px; max-width: 100%;" />
  47. </div>
  48. </div>
  49. <p style="font-size: 15px; line-height: 20px;">Open source reCAPTCHA alternative</p>
  50. </div>
  51. </div>
  52. <div class="row my-4">
  53. <div class="col-12 col-md-6">
  54. <div class="card">
  55. <div class="card-header bg-primary text-light">
  56. <h4 class="card-heading d-flex"><span class="mr-auto">Demo</span> <a onclick="document.getElementById('demoframe').src = 'https://captcheck.netsyms.com/test.html'" title="Reset demo"><i class="fas fa-sync-alt"></i></a></h4>
  57. </div>
  58. <div class="card-body">
  59. <iframe style="border: 0px solid white; width: 100%; height: 100%; height: 200px;" src="https://captcheck.netsyms.com/test.html" id="demoframe"></iframe>
  60. </div>
  61. </div>
  62. </div>
  63. <div class="col-12 col-md-6">
  64. <div class="card">
  65. <div class="card-header bg-primary text-light">
  66. <h4 class="card-heading">Use</h4>
  67. </div>
  68. <div class="card-body">
  69. <b>Put this in your page somewhere:</b>
  70. <pre><code class="language-html">&lt;script src="https://captcheck.netsyms.com/captcheck.dist.js">&lt;/script></code></pre>
  71. <b>Put this in your form where you want the CAPTCHA:</b>
  72. <pre><code class="language-html">&lt;div class="captcheck_container">&lt;/div></code></pre>
  73. <b>Put this in your server-side form validation (PHP example):</b>
  74. <pre><code class="language-php">
  75. $url = 'https://captcheck.netsyms.com/api.php';
  76. $data = [
  77. 'session_id' => $_POST['captcheck_session_code'],
  78. 'answer_id' => $_POST['captcheck_selected_answer'],
  79. 'action' => "verify"
  80. ];
  81. $options = [
  82. 'http' => [
  83. 'header' => "Content-type: application/x-www-form-urlencoded\r\n",
  84. 'method' => 'POST',
  85. 'content' => http_build_query($data)
  86. ]
  87. ];
  88. $context = stream_context_create($options);
  89. $result = file_get_contents($url, false, $context);
  90. $resp = json_decode($result, TRUE);
  91. if (!$resp['result']) {
  92. // Replace with error-handling code
  93. exit("CAPTCHA did not verify:" . $resp['msg']);
  94. } else {
  95. // The CAPTCHA is valid.
  96. exit("CAPTCHA verified!");
  97. }
  98. </code></pre>
  99. <b>If you have a strict Content Security Policy, change your div to this:</b>
  100. <pre><code class="language-html">&lt;div class="captcheck_container" data-stylenonce="your nonce here">&lt;/div></code></pre>
  101. Note: by using this hosted service, you agree to <a href="https://netsyms.com/legal">these terms</a>. If you don't like them, feel free to host Captcheck on your own server.
  102. Popular sites should self-host as well just to be nice.
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. <div class="footer"><p>Copyright &copy; 2018 <a href="https://netsyms.com">Netsyms Technologies</a>. MIT License.<br /><a href="https://source.netsyms.com/Netsyms/Captcheck">Get the source</a> and run your own CAPTCHA service.</p></div>
  108. </div>