Image Captcha Ajax

Categories

Component ID

2608080

Component name

Image Captcha Ajax

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

861

Component created

Component changed

Component body

A.
This module only provide two http/ajax api:

1).
Initialize the captcha session firstly:

URL : http://localhost/ajax/image_captcha_sid
return the captcha image url and the sid.
2).
get captcha image src
URL: http://localhost/ajax/image_captcha_img/[sid]

B.
Another simple way:
The client only request the URL:

http://localhost/ajax/image_captcha?refresh=[timestamp]
this url will generate the captcha image, and will save sid to cookie automatically, refresh the url will regenerate the image also.

Validate:
use this function,

  function image_captcha_ajax_validate_captcha($solution = NULL, $sid = NULL);