Browse Source

Add index.html webpage

master
Skylar Ittner 1 year ago
parent
commit
987639decd
1 changed files with 116 additions and 0 deletions
  1. 116
    0
      index.html

+ 116
- 0
index.html View File

@@ -0,0 +1,116 @@
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
+
14
+    pre {
15
+        padding-left: 5px;
16
+
17
+    }
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
+
28
+    @media only screen and (min-width: 992px) and (max-width: 1199px) {
29
+        h2, h3 {
30
+            text-align: left;
31
+        }
32
+        .site-icon {
33
+            margin-top: 14px;
34
+        }
35
+    }
36
+
37
+    @media only screen and (min-width: 1200px) {
38
+        h2, h3 {
39
+            text-align: left;
40
+        }
41
+        .site-icon {
42
+            margin-top: 0px;
43
+        }
44
+    }
45
+</style>
46
+
47
+<div class="container">
48
+    <div class="card">
49
+        <div class="card-body">
50
+            <div class="row">
51
+                <div class="col-12" style="text-align: center;" >
52
+                    <img src="logo.png" class="site-icon" style="width: 400px; max-width: 100%;" />
53
+                </div>
54
+            </div>
55
+            <p style="font-size: 15px; line-height: 20px;">Open source reCAPTCHA alternative</p>
56
+        </div>
57
+    </div>
58
+    <div class="row my-4">
59
+        <div class="col-12 col-md-6">
60
+            <div class="card">
61
+                <div class="card-header bg-primary text-light">
62
+                    <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>
63
+                </div>
64
+                <div class="card-body">
65
+                    <iframe style="border: 0px solid white; width: 100%; height: 100%; height: 200px;" src="https://captcheck.netsyms.com/test.html" id="demoframe"></iframe>
66
+                </div>
67
+            </div>
68
+        </div>
69
+        <div class="col-12 col-md-6">
70
+            <div class="card">
71
+                <div class="card-header bg-primary text-light">
72
+                    <h4 class="card-heading">Use</h4>
73
+                </div>
74
+                <div class="card-body">
75
+                    <b>Put this in your page somewhere:</b>
76
+                    <pre><code class="language-html">&lt;script src="https://captcheck.netsyms.com/captcheck.dist.js">&lt;/script></code></pre>
77
+                    <b>Put this in your form where you want the CAPTCHA:</b>
78
+                    <pre><code class="language-html">&lt;div class="captcheck_container">&lt;/div></code></pre>
79
+                    <b>Put this in your server-side form validation (PHP example):</b>
80
+                    <pre><code class="language-php">
81
+$url = 'https://captcheck.netsyms.com/api.php';
82
+$data = [
83
+    'session_id' => $_POST['captcheck_session_code'],
84
+    'answer_id' => $_POST['captcheck_selected_answer'],
85
+    'action' => "verify"
86
+];
87
+$options = [
88
+    'http' => [
89
+        'header' => "Content-type: application/x-www-form-urlencoded\r\n",
90
+        'method' => 'POST',
91
+        'content' => http_build_query($data)
92
+    ]
93
+];
94
+$context = stream_context_create($options);
95
+$result = file_get_contents($url, false, $context);
96
+$resp = json_decode($result, TRUE);
97
+if (!$resp['result']) {
98
+    // Replace with error-handling code
99
+    exit("CAPTCHA did not verify:" . $resp['msg']);
100
+} else {
101
+    // The CAPTCHA is valid.
102
+    exit("CAPTCHA verified!");
103
+}
104
+</code></pre>
105
+
106
+                    <b>If you have a strict Content Security Policy, change your div to this:</b>
107
+                    <pre><code class="language-html">&lt;div class="captcheck_container" data-stylenonce="your nonce here">&lt;/div></code></pre>
108
+
109
+                    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.
110
+                    Popular sites should self-host as well just to be nice.
111
+                </div>
112
+            </div>
113
+        </div>
114
+    </div>
115
+    <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>
116
+</div>

Loading…
Cancel
Save