CAPTCHA: How do I create a captcha using WebSpeed?

Cecil

19+ years progress programming and still learning.
OK Many of you are thinking what the heck is a CAPTCHA?

A CAPTCHA (an initialism for "Completely Automated Public Turing test to tell Computers and Humans Apart", trademarked by Carnegie Mellon University) is a type of challenge-response test used in computing to determine whether or not the user is human. The term was coined in 2000 by Luis von Ahn, Manuel Blum, Nicholas J. Hopper of Carnegie Mellon University, and John Langford of IBM. A common type of CAPTCHA requires that the user type the letters of a distorted image, sometimes with the addition of an obscured sequence of letters or digits that appears on the screen. Because the test is administered by a computer, in contrast to the standard Turing test that is administered by a human, a CAPTCHA is sometimes described as a reverse Turing test. This term is ambiguous because it could also mean a Turing test in which the participants are both attempting to prove they are the computer.

--Reference from wikipedia.

Now my main question is: "How do I create a captcha using WebSpeed?". I and if anyone suggested to use PHP. Please show me a working example using PHP and WebSpeed.

Many Thanks.
 

Casper

ProgressTalk.com Moderator
Staff member
As far as I know there are no Progress projects to do this. In php there are librarys like the GD library.
There are some sourceforge projects on this topic. Maybe you can integrate them in your webspeed application. I'm very interested to hear wether or not you succeeded.

Regards,

casper.
 

Cecil

19+ years progress programming and still learning.
OK I bit the bullet and I have had a crack at creating a dynamic CAPTCHA image using WebSpeed.

To start off with the image is not created in WebSpeed but shelling out to the OS and running ImageMagick.

By using ImageMagick I was able to create a dynamic image passing some random text (i.e. 1234), add a "swirl" :dizzy: affect and the piping in through to uuencode with the -m option (-m base64). Store the hole Base64 string into a long-char and using the the ABL basee64-decode function, store the Image in a Memptr ready to be outputted to the web browser.

I think I could create API procedures with hook into the C/C++ code. But the problem is there is that I am not C programmer.

Once I get the code running smooth I will post an example code.
I have attached an Image which has been created by ImageMagick via WebSpeed.
 

Attachments

  • Online.gif
    Online.gif
    29.8 KB · Views: 34

joey.jeremiah

ProgressTalk Moderator
Staff member
OK I bit the bullet and I have had a crack at creating a dynamic CAPTCHA image using WebSpeed.

To start off with the image is not created in WebSpeed but shelling out to the OS and running ImageMagick.

By using ImageMagick I was able to create a dynamic image passing some random text (i.e. 1234), add a "swirl" :dizzy: affect and the piping in through to uuencode with the -m option (-m base64). Store the hole Base64 string into a long-char and using the the ABL basee64-decode function, store the Image in a Memptr ready to be outputted to the web browser.

I think I could create API procedures with hook into the C/C++ code. But the problem is there is that I am not C programmer.

Once I get the code running smooth I will post an example code.
I have attached an Image which has been created by ImageMagick via WebSpeed.

Wow, that is really cool !
 

smapdi636

New Member
I think I could create API procedures with hook into the C/C++ code. But the problem is there is that I am not C programmer.

Why not just shell out to ImageMagick command-line? EDIT: Upon re-reading your post I see that is what you did. :eek:

Let me rephrase my question ... why not be happy with shelling out to ImageMagick command-line?

EDIT again:
and the piping in through to uuencode with the -m option (-m base64). Store the hole Base64 string into a long-char and using the the ABL basee64-decode function, store the Image in a Memptr ready to be outputted to the web browser
Why not just allow ImageMagick command line to save your file to the webserver filesystem then call that image up via the <img src="" html?
 
Top