Skip to content

Instantly share code, notes, and snippets.

View Asgaros's full-sized avatar

Thomas Belser Asgaros

View GitHub Profile
@Asgaros
Asgaros / asgaros_forum_captcha_example.php
Last active August 16, 2016 21:53
Asgaros Forum: Captcha example
<?php
function editor_custom_content_bottom() {
global $asgarosforum;
if (!is_user_logged_in() && $asgarosforum->options['allow_guest_postings']) {
$captcha_instance = new ReallySimpleCaptcha();
$captcha_word = $captcha_instance->generate_random_word();
$captcha_prefix = mt_rand();
$captcha_file = $captcha_instance->generate_image($captcha_prefix, $captcha_word);