captcha help

See attached.

I am at a loss on how to use this to display the image on an html page.

What should the php / html code be?

I used this; <img src=<?php print "captcha.php"; ?>>

The image displays, but $_SESSION['code'] is NOT set.


Thanks
captcha.php
Richard KortsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
You know you can get the complete code from http://www.captcha.net/ so you don't have to create your own from scratch.  ??
0
Ray PaseurCommented:
This article has several examples that may be able to help.  It's really easy if you follow the general designs shown here.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_9849-Making-CAPTCHA-Friendlier-with-PHP-Image-Manipulation.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Richard KortsAuthor Commented:
Dave Baldwin,

I've already tried to go down the Google road, it's basically impossible. I don't have time to explain all the complexities. I was just HOPING you guys could tell me what was wrong with the one I have; I DID NOT create that, I had it "hanging around" & it looks so simple.....................
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Ray PaseurCommented:
"Looks simple" is not the same as "I understand the code and process, and it works."  

The general principles are fairly straightforward.  Your "form" script generates a value and stores it in the session.  Your form script translates this value into a visual representation (image, arithmetic problem, etc) that is easy for humans to understand but hard for computers to decode programmatically.  Your "action" script compares the form input values to the representation stored in the session.  Match? OK, it's probably a person.  Mismatch? Discard the input.

At high levels, there is more to this, of course, but for 99% of what we do online, the CAPTCHA article has good solutions. If there is anything you read in the article that you do not understand, please post back and I'll be glad to explain further.
0
Dave BaldwinFixer of ProblemsCommented:
I've use the Google 'reCaptcha' on several sites.  Ray's description is correct for every version I've seen.  Your code is only the image part which is just a small part of the process.  Ray's article shows methods that don't even require images.
0
Richard KortsAuthor Commented:
The reason I don't seem to be able to use Google ReCaptcha...........

When I go to the link to that, it already has the url listed that I am working on.

I suspect that is because the majority of the site is WordPress; what I am trying to tackle is a custom php page & processing script that are OUTSIDE of WordPress; I was told I could use the same recaptcha, but I need the "public key" which I cannot find in WordPress; I sent an hour or so, don't see where it is.
0
Richard KortsAuthor Commented:
FYI, I understand the principles of basic captcha.

I've done it MANY times but I can't make it work on this site. I've tried 3 or 4 different approaches, NONE work. I'm using approaches that work on other sites.

Richard
0
Richard KortsAuthor Commented:
I used a form of the "Honey Pot" technique. I see no way to test it except to force a value in the hidden field; it works fine for a human submission.

Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.