Project

General

Profile

« Previous | Next » 

Revision 615

Added by thorn almost 17 years ago

Added new CAPTCHA (calc_ttf_image). Changed call_captcha() to output a table-layout. Some minor changes to captcha-code.

View differences:

readme.txt
26 26
- and by adding TrueType-fonts to fonts/
27 27

  
28 28

  
29
The CAPTCHA-string is allways stored in $_SESSION['captcha']
30
The input-field is called "captcha", too.
29
How to use:
30
use 
31
	require_once(WB_PATH.'/include/captcha/captcha.php'); // will output a table with 3 columns: |CAPTCHA|Input|Text|
32
and put 
33
	<?php call_captcha(); ?>
34
into your form.
31 35

  
36

  
37
The CAPTCHA-code is allways stored in $_SESSION['captcha']
38
The user-input is in $_POST['captcha'] (or $_GET['captcha']).
39

  
40

  
41
call_captcha() will output code like this
42
<table class="captcha_table"><tr>
43
  <td><img src="<?php echo WB_URL.'/include/captcha/captchas/'.CAPTCHA_TYPE.".php?t=$t"; ?>" alt="Captcha" /></td>
44
  <td><input type="text" name="captcha" maxlength="5" style="width:50px" /></td>
45
  <td class="captcha_expl"><?php echo $MOD_CAPTCHA['VERIFICATION_INFO_TEXT']; ?></td>
46
</tr></table>

Also available in: Unified diff