2
votes

I am using Confident Technologies Image Captcha and within their technologu I need to post to their servers, which in return will then pass back the HTML code. See: https://login.confidenttechnologies.com/docs/restful

I have produced a an VBScript for this but I can get the results I need. The Function is :

FUNCTION CreateSecurity()
  Dim nURL : nURL = "http://captcha.confidenttechnologies.com/captcha"
  Dim SendStr : SendStr =     "api_username=jqcsgvsi47g9BEgncu2Mb9pINE4W5tEYNPIwMHFR&api_password=pHm5IDZhLiaeY8raDStdEyoRiBeqoTSMDeFxkWcM&customer_id=K9PWSU6s&site_id=storeboard"
  Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
  xmlhttp.open "POST", nURL, false
  xmlhttp.setRequestHeader "Content-Type", "application x-www-form-urlencoded"
  xmlhttp.send(SendStr)
  Response.write xmlhttp.responseText
  Set xmlhttp = nothing
END FUNCTION

I simply call this function where I want the capture to appear. However when I call the function I get the following result:

Bad Request

site_id may not be blank.

api_password may not be blank.

api_username may not be blank.

customer_id may not be blank.

See Results: http://www.storeboard.com/join_now_new.asp

Does anyone know what I am doing wrong?

Any help would be truly appreciated.

Many thanks in advance, Paul

1

1 Answers

3
votes

Two suggestions:

1) I found this article, the result of which would be to change your content type header to xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

2) Use Fiddler to analyze the request and make sure the headers and form data are sent.

Good luck