选择语言 :

Core_Captcha

缩略图对象

API - Core_Captcha

author
呼吸二氧化碳 jonwang@myqee.com
category
MyQEE
package
System
subpackage
Core
copyright
Copyright © 2008-2013 myqee.com
license
http://www.myqee.com/license.html

Captcha::valid( )


Captcha::valid_count( $new_count = null, $invalid = false)

Gets or sets the number of valid Captcha responses for this session.

参数列表

参数 类型 描述 默认值
$new_count integer New counter value null
$invalid boolean Trigger invalid counter (for internal use only) bool false
返回值
  • integer counter value

Captcha::promoted( $threshold = null)

Checks whether user has been promoted after having given enough valid responses.

参数列表

参数 类型 描述 默认值
$threshold integer Valid response count threshold null
返回值
  • boolean

Captcha::render( $config = false)

render image

参数列表

参数 类型 描述 默认值
$config array $config bool false
返回值
  • image

Captcha::generate_challenge( )

Generates a new captcha challenge.

返回值
  • string the challenge answer

Captcha::random( )


$this->image_create( $background = null)

Creates an image resource with the dimensions specified in config. If a background image is supplied, the image dimensions are used.

参数列表

参数 类型 描述 默认值
$background string Path to the background image file null
返回值
  • void

$this->image_gradient( $color1 , $color2 , $direction = null)

Fills the background with a gradient.

参数列表

参数 类型 描述 默认值
$color1 resource Gd image color identifier for start color
$color2 resource Gd image color identifier for end color
$direction string Direction: 'horizontal' or 'vertical', 'random' by default null
返回值
  • void

$this->image_render( )

Returns the img html element or outputs the image to the browser.

返回值
  • mixed html string or void