reCAPTCHA code

reCAPTCHA helps prevent automated abuse of your site (such as comment spam or bogus registrations) by using a CAPTCHA to ensure that only humans perform certain actions.

Sample code for reCAPTCHA using WebDNA.
By Dan Strong -
Free to use, no strings attached.
More info about WebDNA:

[!]-- This code is for your form --[/!]

<script type="text/javascript"
<iframe src="[yourPublicKey]"
height="300" width="500" frameborder="0"></iframe><br />
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge">

[!]-- This code is for your form landing page --------------------------------------------------
//privatekey (required): Your private key
//remoteip (required): The IP address of the user who solved the CAPTCHA.
//challenge (required): The value of "recaptcha_challenge_field" sent via the form
//response (required): The value of "recaptcha_response_field" sent via the form
//reCaptcha_server-response - Will be either TRUE or FALSE. FALSE will include a reason.

[text]remoteip=[listWords words=[ipaddress]&delimiters=.][math][word][/math][hideif [index]>3].[/hideif][/listWords][/text]
[text]challenge=[formvariables][showif [url][name][/url]=[url]recaptcha_challenge_field[/url]][value][/showif][/formVariables][/text]
[text]response=[formvariables][showif [url][name][/url]=[url]recaptcha_response_field[/url]][value][/showif][/formVariables][/text]


[/!][TCPsend skipheader=T]POST /verify HTTP/1.0[unurl]%0D%0A[/unURL][!]
[/!]USER-AGENT: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)[unurl]%0D%0A[/unURL][!]
[/!]Content-Type: application/x-www-form-urlencoded[unurl]%0D%0A[/unURL][!]
[/!]Content-Length: [countchars][content][/countChars][unurl]%0D%0A[/unURL][!]

[showif [reCaptcha_server-response]^false]
[redirect [referrer]?error=wrongCaptcha]

Dan Strong


Top Articles:


BioType is a behavioral biometrics WebDNA function based on ADGS research and development (from version 8...


A compilation of some user's questions...

Download WebDNA Applications

WebDNA applications...

WebDNA Modules

A list of the currently available modules...

WebDNA Libraries

A list of available libraries for WebDNA...

Technical Change History

This Technical Change History provides a reverse chronological list of WebDNA changes...

Related Readings:

Cloning a Record


Do you hate updating the copyright notice at the bottom of all your pages?

It's January 1st and you have to update the copyright notice at the bottom of all your websites...

random password-generator code

Generate a random alpha-numeric string...

Setting a 30-minute Cookie

Configuring the expires time for a short-term cookie is tricky...

Find duplicate records

Find duplicate records and do something with them...

Write Once Use Many

Reuse the same code over and over again on your site with the [include] context...