cancel
Showing results for 
Search instead for 
Did you mean: 

how to use captcha in web dynrpo abap??

Former Member
0 Kudos

hi all,

i want to implement captcha in sap abap web dynrpo . Is it possible to implement it without JAVA??

regards

vaibhav

Accepted Solutions (0)

Answers (3)

Answers (3)

jan_krohn
Active Participant
0 Kudos

Yes, it's possible. We've implemented it before.

Short version: Create random string images, and use bitmap operations to scramble the image in various ways.

An explanation of the entire process would take many pages. So all I can tell you: Yes it's possible, and a bit tedious to tune performance on the various bitmap operations.

Best wishes,

Jan

joachimvanpraet
Active Participant
0 Kudos

Hi Vaibhav,

You need an external tool to generate the captcha files. In my blog I used a javalibrary to do this, but you can generate these images with several tools (PHP, Java, ...). You can combine this tool: http://www.opencaptcha.com/ with the information in my blog to reach your goal.

1. generate a random string in ABAP.

2. the url of the captchaImage: http://www.opencaptcha.com/img/<yourrandomgeneratedstring>.jpgx

3. To check the answer you can do a HTTP request to this url: http://www.opencaptcha.com/validate.php?img=<yourrandomgeneratedstring>&ans=<answerofftheuser> (use the class cl_http_client)

4. if the answer is correct, the request will return pass, otherwise it will return fail.

try it with these urls:

http://www.opencaptcha.com/img/randomstring.jpgx generates a captcha image with the word: tym

http://www.opencaptcha.com/validate.php?img=randomstring&ans=tym will pass

http://www.opencaptcha.com/validate.php?img=randomstring&ans=somethingelse will fail

kr,

Joachim

amy_king
Active Contributor
0 Kudos

Hi Vaibhav,

Joachim Van Praet recently published a document, , though a Java server is needed for his solution.

Cheers,

Amy