开发者

modify standard usage of HttpURLConnection to make POST request to form containing captcha, in java

At http://code.google.com/appengine/docs/java/urlfetch/usingjavanet.html some code is provided which makes POST request to a form where comments are submitted to that form.

I want to use similar code to make a POST request to a form that accepts data...But one major requirement is that when the form at "http://domain.com/submit.php" is to be submitted, it has a text field named "CAPTCHA" for which the relevant captcha is actually generated by "http://domain.com/captcha.php".

My question is, how to use HttpURLConnection to make a request to a form with 3 fields- "UserID" and "Pa开发者_运维百科ssword" and finally "Captcha" (which is generated by captcha.php)? I am particularly confused here with ref to the captcha, since each time a different captcha is generated... How do we know the value of this captcha, i.e. how do we display this captcha on screen, and then submit the form. Can we also track the response to such a submission?

I am new to Java, plus a total newbie to App Engine, so any help would be appreciated :)


Captchas are specifically designed to prevent people from doing the sort of thing you seem to be attempting to do.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜