From aca444f564e83fc1a7112412bf5ce558ca355e5f Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 8 May 2009 13:32:23 +0000 Subject: Closes #1011: Added basic captcha support. git-svn-id: https://code.elgg.org/elgg/trunk@3270 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/captcha/captcha.php | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 mod/captcha/captcha.php (limited to 'mod/captcha/captcha.php') diff --git a/mod/captcha/captcha.php b/mod/captcha/captcha.php new file mode 100644 index 000000000..5693b89ac --- /dev/null +++ b/mod/captcha/captcha.php @@ -0,0 +1,41 @@ +captcha_num_bg); + $image = imagecreatefromjpeg($CONFIG->pluginspath . "captcha/backgrounds/bg$n.jpg"); + + // Create a colour (black so its not a simple matter of masking out one colour and ocring the rest) + $colour = imagecolorallocate($image, 0,0,0); + + // Write captcha to image + //imagestring($image, 5, 30, 4, $captcha, $black); + imagettftext($image, 30, 0, 10, 30, $colour, $CONFIG->pluginspath . "captcha/fonts/1.ttf", $captcha); + + // Output image + imagejpeg($image); + + // Free memory + imagedestroy($image); + } +?> \ No newline at end of file -- cgit v1.2.3