托管代码的服务器正在运行 Coldfusion 4.5。有问题的页面是一个框架集,所以我不能直接链接到它。
就是这个页面: http: //www.palosverdes.com/calendar/,然后是右边“Admin”下的注册链接。
在允许被阻止的内容后,现在那里的代码可以按预期在 IE 上运行。这是代码:
<cfscript>
CHALLENGE_URL = "http://api.recaptcha.net";
SSL_CHALLENGE_URL = "https://api-secure.recaptcha.net";
VERIFY_URL = "http://api-verify.recaptcha.net/verify";
</cfscript>
<cfif isDefined("form.recaptcha_challenge_field") and isDefined("form.recaptcha_response_field")>
<cftry>
<cfhttp url="#VERIFY_URL#" method="post" throwonerror="true">
<cfhttpparam type="formfield" name="privatekey" value="6LfwVs0SAAAAAIlIJpLDvIay_d5G0RncS0VSrnV0">
<cfhttpparam type="formfield" name="remoteip" value="#cgi.REMOTE_ADDR#">
<cfhttpparam type="formfield" name="challenge" value="#form.recaptcha_challenge_field#">
<cfhttpparam type="formfield" name="response" value="#form.recaptcha_response_field#">
</cfhttp>
<cfcatch>
<cfthrow type="RECAPTCHA_NO_SERVICE"
message="recaptcha: unable to contact recaptcha verification service on url '#VERIFY_URL#'">
</cfcatch>
</cftry>
<cfset aResponse = listToArray(cfhttp.fileContent, chr(10))>
<cfset form.recaptcha = aResponse[1]>
<cfset structDelete(form, "recaptcha_challenge_field")>
<cfset structDelete(form, "recaptcha_response_field")>
<cfif aResponse[1] eq "false" and aResponse[2] neq "incorrect-captcha-sol">
<cfthrow type="RECAPTCHA_VERIFICATION_FAILURE"
message="recaptcha: the verification service responded with error '#aResponse[2]#'. See http://recaptcha.net/apidocs/captcha/ for error meanings.">
</cfif>
<cfelse>
<cfset form.recaptcha = false>
</cfif>
<cfif isdefined("form.recaptcha") and form.recaptcha neq "false">
<cfinclude template="addorgresults.cfm">
<cfelse>
我已经使用此页面http://www.palosverdes.com/sandbox/captchatest.cfm来确定验证码本身是否正常工作,所以我的猜测是它与将验证码放入框架集中有关。有任何想法吗?