<% ' On Error Resume Next ' Classsic ASP pages created by Andre F Bruton ' E-mail: andre@bruton.co.za ' Date: 2008/01/19 recaptcha_public_key = "6LeVYMwSAAAAACq0EJVbwzQIZRjH0930RpONSQXh" %>



<% response.write "  Enquiry for WIM

  If you've any enquiry, please feel free to complete the form below and submit to us.


" %>
Company Name:

A value is required.

Contact Person:


E-mail:

A value is required.Invalid format.

Tel.:

A value is required.Invalid format.

Fax:


<%=recaptcha_challenge_writer(recaptcha_public_key)%>
Address:


Inquiry:

A value is required.

Nature of Business:
If others, please specify:
* To avoid this inquiry from being treated as SPAM, please type the anti-spam code on the left before hitting the 'Submit' button.



<% ' The code below supplied by Mark Short ' returns string the can be written where you would like the reCAPTCHA challenged placed on your page function recaptcha_challenge_writer(publickey) recaptcha_challenge_writer = "" & _ "" & _ "" end function function recaptcha_confirm(privkey,rechallenge,reresponse) ' Test the captcha field Dim VarString VarString = _ "privatekey=" & privkey & _ "&remoteip=" & Request.ServerVariables("REMOTE_ADDR") & _ "&challenge=" & rechallenge & _ "&response=" & reresponse Dim objXmlHttp Set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP") objXmlHttp.open "POST", "http://api-verify.recaptcha.net/verify", False objXmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" objXmlHttp.send VarString Dim ResponseString ResponseString = split(objXmlHttp.responseText, vblf) Set objXmlHttp = Nothing if ResponseString(0) = "true" then ' They answered correctly recaptcha_confirm = "" else ' They answered incorrectly recaptcha_confirm = ResponseString(1) end if end function %>