Hi Don,
That site is done in NT5.
You'll be familiar with the HTML required to add the Captcha, mine looks like this:
<script type="text/javascript">
var RecaptchaOptions = {theme : 'clean' };
</script>
<script src="http://api.recaptcha.net/challenge?k=***mykey***" type="text/javascript"></script>
<noscript><iframe src="http://api.recaptcha.net/noscript?k=***mykey***" 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"></noscript> Thats placed within a form. So in NT embed it as either XHTML or via embed point so it generates within your form.
When the form submits you'll get the following additional fields:
recaptcha_challenge_field
recaptcha_response_fieldThese fields require "testing" via their webserver to determine whether the user got it right or wrong.
This requires a HTTPS POST.
I wrote a quick little procedure called "PostFormResponse" to do a form POST submission.
After the form is submitted i then:
lResponse = PostFormResponse('http://api-verify.recaptcha.net/verify','privatekey=***key***&remoteip='&p_web.RequestData.FromIP&'&challenge='&CLIP(p_web.GetValue('recaptcha_challenge_field'))&'&=&response='&p_web.GetValue('recaptcha_response_field'))lResponse holds the response from their webservice. "true" on the second line means they got it right false means they didn't.
As the webservice is HTTPS, then you need to make sure certain files are available for HTTPS to work (in NT Doco under HTTPS) I also needed to copy the CARoot.pem into the program folder.
Thats a rough outline.
Essentially:
1. Get the captcha code inside your form so the two fields it generates get submitted in the form.
2. After the form submits, but before you do anything else call their webservice and check whether it works.
The function PostFormResponse will be attached as TXA (TXT actually since it doesnt allow TXA).
Regards
Bill
[attachment deleted by admin]