aboutsummaryrefslogtreecommitdiff
path: root/subscribe.php
diff options
context:
space:
mode:
authorarf20 <aruizfernandez05@gmail.com>2026-07-01 20:15:42 +0200
committerarf20 <aruizfernandez05@gmail.com>2026-07-01 20:15:42 +0200
commitb7ed54f91c373aef452b3540c8cd352d11305c30 (patch)
treea4cb7c87a02e29ee59696ce0f8c245aaa4cee525 /subscribe.php
parentfe649aed998af16df2af646bd0acfed0175f3aa9 (diff)
downloadarfnet2-lists-b7ed54f91c373aef452b3540c8cd352d11305c30.tar.gz
arfnet2-lists-b7ed54f91c373aef452b3540c8cd352d11305c30.zip
Add captcha
Diffstat (limited to 'subscribe.php')
-rw-r--r--subscribe.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/subscribe.php b/subscribe.php
index f60c15b..f2e9d56 100644
--- a/subscribe.php
+++ b/subscribe.php
@@ -1,5 +1,12 @@
<?php
+require 'CaptchasDotNet.php';
+
+$captchas = new CaptchasDotNet ('arf20', '7QOD8AEp5n9ib5bp',
+ '/tmp/captchasnet-random-strings','3600',
+ 'abcdefghkmnopqrstuvwxyz','6',
+ '240','80','000088');
+
if (!isset($_GET["list"]) || empty($_GET["list"])) {
die("List required");
}
@@ -34,6 +41,8 @@ $domain = "arf20.com"
<input name="job" type="hidden" value="subscribe">
<input name="redirect_failure" type="hidden" value="/error.html">
<input name="redirect_success" type="hidden" value="/">
+ <input type="hidden" name="random" value="<?= $captchas->random () ?>" />
+ <input name="captcha" size="6" />
<br><input type="submit" value="Subscribe">
</form>
@@ -45,9 +54,20 @@ $domain = "arf20.com"
<input name="job" type="hidden" value="unsubscribe">
<input name="redirect_failure" type="hidden" value="/error.html">
<input name="redirect_success" type="hidden" value="/">
+ <input type="hidden" name="random" value="<?= $captchas->random () ?>" />
+ <input name="captcha" size="6" />
<br><input type="submit" value="Subscribe">
</form>
+ <?= $captchas->image () ?> <a href="javascript:captchas_image_reload('captchas.net')">Reload Image</a>
+
+ <hr>
+ <h2>E-mail based subscription</h2>
+ <ul>
+ <li>To subscribe to <?php echo $list; ?>, send a message to <?php echo $list; ?>+subscribe@arf20.com</li>
+ <li>To unsubscribe, send a message to <?php echo $list; ?>+unsubscribe@arf20.com</li>
+ </ul>
</div>
</main>
</body>
</html>
+