Wählen Sie Ihre Sprache:

<we:captcha>

Since version: 4.0 | Requires endtag: no

Description

This tag generates an image with a random code.

Attributes

width

Default value: 100 | since version: 4.0 | required: yes

Enter the width of the captcha-image you want to display.


height

Default value: 25 | since version: 4.0 | required: yes

Enter the height of the captcha-imageyou want to display.


maxlength

Default value: 5 | since version: 4.0 | required: no

With this attribute you determine the maximum length of the generated random code.


path

Default value: / | since version: 4.0 | required: no

Setting this attribute defines the folder where the captcha image will be saved. If this attribute is not set, the file will be stored in your document root.


subset

Default value: alphanum | since version: 4.0 | required: no

Using this attribute will set the character subset which will be used for generating the code. The following values are possible: alphanum: A-Z,a-z,0-9 alpha: A-Z,a-z num: 0-9

Allowed values:

  • alphanum
  • alpha
  • num

Default value: i,I,l,L,0,o,O,1,g,9 | since version: 4.0 | required: no

Through entering a comma-separated list certain signs can be excluded when generating the code.


fontcolor

Default value: #000000 | since version: 4.0 | required: no

Using this attribute changes the font color of the generated code can be made. Please insert all possible colors as a commaseperated list of HEX-Codes.

Allowed values:

  • #000000
  • #ffffff
  • #ff0000
  • #00ff00
  • #0000ff
  • #ffff00
  • #ff00ff
  • #00ffff

fontsize

Default value: 14 | since version: 4.0 | required: no

Setting this attribute manipulates the font size of the generated code. Specifying only one number, each sign will have the same font size. Specifying two numbers, seperated by a comma, the font size for each code element will vary within that range.


bgcolor

Default value: #ffffff | since version: 4.0 | required: no

Use this attribute to set the background color of the image.

Allowed values:

  • #ffffff
  • #cccccc
  • #888888

transparent

Default value: false | since version: 4.0 | required: no

If this attribute is set to "true", the background of the picture will be transparent. If the attribute is not set or set to "false", the color defined in the attribute "bgcolor" is used as background.

Allowed values:

  • false
  • true

style

Default value: - | since version: 4.0 | required: no

This attribute specifies what kind of styles should be used in order to obliterate the code. Leaving this attribute empty, no objects will make the code unreadable.

Allowed values:

  • strikeout
  • fullcircle
  • fullrectangle
  • outlinecircle
  • outlinerectangle

stylecolor

Default value: #cccccc | since version: 4.0 | required: no

By the use of this attribute you could variate the color of the objects defined with the attribute "style". Please insert all possible colors as a comma-seperated list of HEX-Codes.

Allowed values:

  • #cccccc
  • #ff0000
  • #00ff00
  • #0000ff
  • #00ffff
  • #ff00ff
  • #ffff00

angle

Default value: 0 | since version: 4.0 | required: no

This attribute affects the random slant of the code elements. If only one value is set, the slant will be used for each side. If two values are specified, the slant will vary from element to element within the range of the values.


align

Default value: random | since version: 4.0 | required: no

Allowed values:

  • random
  • center
  • left
  • right

valign

Default value: random | since version: 4.0 | required: no

Set the value of this attribute to the vertical alignment of the code within the image.

Allowed values:

  • random
  • top
  • middle
  • bottom

font

Default value: - | since version: 4.0 | required: no

Set this attribute to a comma seperated list of fonts you want to use within the generated captcha image. If you use this attribute the path to the .ttf files needs to be set using the "fontpath" attribute.


fontpath

Default value: - | since version: 4.0 | required: no

Setting the attribute "fontpath" specifies the path where the .ttf files are located. The font specified with the attribute "font" will be searched for in this directory.


case

Default value: mix | since version: 4.0 | required: no

The indication of this attribute determines whether only lower-case characters (lower), upper-case characters (upper) or both (mix) should be used.

Allowed values:

  • mix
  • upper
  • lower

type

Default value: gif | since version: 4.0 | required: no

Indication of this attribute specifies what kind of image will be generated. If this attribute is not set, a GIF graphic will be produced.

Allowed values:

  • gif
  • jpg
  • png

stylenumber

Default value: 5,10 | since version: 4.0 | required: no

Setting this attribute changes the number of objects defined within the attribute "style". Specifying two numbers, seperated by a comma, the numbers will variate within this range.


Syntax

<we:captcha width="attribute" height="attribute" [maxlength="attribute"] [path="attribute"] [subset="alphanum|alpha|num"] [skip="attribute"] [fontcolor="#000000|#ffffff|#ff0000|#00ff00|#0000ff|#ffff00|#ff00ff|#00ffff"] [fontsize="attribute"] [bgcolor="#ffffff|#cccccc|#888888"] [transparent="false|true"] [style="strikeout|fullcircle|fullrectangle|outlinecircle|outlinerectangle"] [stylecolor="#cccccc|#ff0000|#00ff00|#0000ff|#00ffff|#ff00ff|#ffff00"] [angle="attribute"] [align="random|center|left|right"] [valign="random|top|middle|bottom"] [font="attribute"] [fontpath="attribute"] [case="mix|upper|lower"] [type="gif|jpg|png"] [stylenumber="attribute"] />

Examples

Example 1

<we:captcha width="100" height="25" maxlength="7" font="Times,Arial,Verdana" fontsize="15" fontcolor="#000000,#232323" case="lower" subset="alphanum" skip="1,l,i,I,o,O,0" style="strikeout,circle,rectangle" stylecolor="#dedede,#a0a0a0,#e3e3e3,#c0c0c0" valign="middle" />

Example 2

<we:captcha width="100" height="25" maxlength="8" font="Times" fontsize="15" fontcolor="#000000" case="lower" subset="num" style="strikeout" angle="15" />