HTTP API


Getting the image

Your user should load the CAPTCHA image (PNG, 220x80) from the following URL:

http://raincaptcha.driversworld.us/captcha/?key=%USER_IDENTIFIER%

Where %USER_IDENTIFIER% is a unique string which identifies the user. We recommend you to use the user's IP address, combined with the domain name of your website.

Example: Displaying the image on a html page

If you want to display the CAPTHCA image on a web page, we recommend you to use an img tag:

<img src="http://raincaptcha.driversworld.us/captcha/?key=%USER_IDENTIFIER%" />

<img src="http://raincaptcha.driversworld.us/captcha/?key=example_org:127.0.0.1" />
<img src="http://raincaptcha.driversworld.us/captcha/?key=username@example.org" />

Checking the answer

To check whether the user's response is correct or not, load page from the following URL:

http://raincaptcha.driversworld.us/captcha/test/?key=%USER_IDENTIFIER%&code=%CAPTCHA_ANSWER%

Where %USER_IDENTIFIER% is a string which identifies the user and %CAPTCHA_ANSWER% is the submitted answer. If the submitted answer is correct, RainCaptcha will return true, and otherwise it will return false.

Examples

http://raincaptcha.driversworld.us/captcha/test/?key=example_org:127.0.0.1&code=abcde
http://raincaptcha.driversworld.us/captcha/test/?key=username@example.org&code=fghij

Advertisement