Friendly, easy, lightweight, self-hostable CAPTCHA service. https://captcheck.netsyms.com
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

index.html 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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.materia.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. .bg-minty {
  17. background-color: #7dffd2;
  18. }
  19. @media only screen and (min-width: 768px) and (max-width: 991px) {
  20. h2, h3 {
  21. text-align: left;
  22. }
  23. .site-icon {
  24. margin-top: 18px;
  25. }
  26. }
  27. @media only screen and (min-width: 992px) and (max-width: 1199px) {
  28. h2, h3 {
  29. text-align: left;
  30. }
  31. .site-icon {
  32. margin-top: 14px;
  33. }
  34. }
  35. @media only screen and (min-width: 1200px) {
  36. h2, h3 {
  37. text-align: left;
  38. }
  39. .site-icon {
  40. margin-top: 0px;
  41. }
  42. }
  43. </style>
  44. <div class="container">
  45. <div class="card">
  46. <div class="card-body">
  47. <div class="row">
  48. <div class="col-12" style="text-align: center;" >
  49. <img src="logo.png" class="site-icon" style="width: 400px; max-width: 100%;" />
  50. </div>
  51. </div>
  52. <p style="font-size: 15px; line-height: 20px;">Open source reCAPTCHA alternative</p>
  53. <div class="d-flex">
  54. <ul class="nav nav-pills mx-auto">
  55. <li class="nav-item">
  56. <span class="nav-link">
  57. <i class="fab fa-php"></i> PHP 7
  58. </span>
  59. </li>
  60. <li class="nav-item">
  61. <span class="nav-link">
  62. <i class="fas fa-database"></i> MySQL
  63. </span>
  64. </li>
  65. <li class="nav-item">
  66. <a class="nav-link" href="https://source.netsyms.com/Netsyms/Captcheck/src/branch/master/LICENSE" style="color: #444;">
  67. <i class="fas fa-file-contract"></i> MIT
  68. </a>
  69. </li>
  70. <li class="nav-item">
  71. <a class="nav-link" href="https://source.netsyms.com/Netsyms/Captcheck" style="color: #444;">
  72. <i class="fas fa-code-branch"></i> Git
  73. </a>
  74. </li>
  75. </ul>
  76. </div>
  77. </div>
  78. </div>
  79. <div class="row my-4">
  80. <div class="col-12 col-md-6">
  81. <div class="card">
  82. <div class="card-header bg-minty">
  83. <h4 class="card-heading d-flex mb-0"><span class="mr-auto">Demo</span> <a onclick="document.getElementById('demoframe').src = document.getElementById('demoframe').src" title="Reset demo"><i class="fas fa-sync-alt"></i></a></h4>
  84. </div>
  85. <div class="card-body">
  86. <iframe style="border: 0px solid white; width: 100%; height: 100%; height: 350px;" src="test.html" id="demoframe"></iframe>
  87. </div>
  88. </div>
  89. </div>
  90. <div class="col-12 col-md-6">
  91. <div class="card">
  92. <div class="card-header bg-minty">
  93. <h4 class="card-heading mb-0">Use</h4>
  94. </div>
  95. <div class="card-body">
  96. <b>Put this in your page somewhere:</b>
  97. <pre><code class="language-html">&lt;script src="https://captcheck.netsyms.com/captcheck.min.js">&lt;/script></code></pre>
  98. <b>Put this in your form where you want the CAPTCHA:</b>
  99. <pre><code class="language-html">&lt;div class="captcheck_container">&lt;/div></code></pre>
  100. <b>Put this in your server-side form validation (PHP example):</b>
  101. <pre><code class="language-php">
  102. $url = 'https://captcheck.netsyms.com/api.php';
  103. $data = [
  104. 'session_id' => $_POST['captcheck_session_code'],
  105. 'answer_id' => $_POST['captcheck_selected_answer'],
  106. 'action' => "verify"
  107. ];
  108. $options = [
  109. 'http' => [
  110. 'header' => "Content-type: application/x-www-form-urlencoded\r\n",
  111. 'method' => 'POST',
  112. 'content' => http_build_query($data)
  113. ]
  114. ];
  115. $context = stream_context_create($options);
  116. $result = file_get_contents($url, false, $context);
  117. $resp = json_decode($result, TRUE);
  118. if (!$resp['result']) {
  119. // Replace with error-handling code
  120. exit("CAPTCHA did not verify:" . $resp['msg']);
  121. } else {
  122. // The CAPTCHA is valid.
  123. exit("CAPTCHA verified!");
  124. }
  125. </code></pre>
  126. <b>If you have a strict Content Security Policy, change your div to this:</b>
  127. <pre><code class="language-html">&lt;div class="captcheck_container" data-stylenonce="your nonce here">&lt;/div></code></pre>
  128. 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.
  129. Popular sites should self-host as well just to be nice.
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. <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>
  135. </div>