Help - Search - Members - Calendar
Full Version: Php Captcha And Gd
Zymic Webmaster Forums > Web Design & Development > Server Side Scripting > PHP
Gibbons
Php Captcha and GD

I have managed to create my own php captchas using php and GD, however I was wondering how to go about changing the orientation of the text. Does anyone know what to do?

I want to produce something similar to the curving shown below:
Click to view attachment

Thanks very much. wink.gif
Glenn McGurrin
look at this, send each character separately, then set the angles differently
http://us.php.net/manual/en/function.imagettftext.php

let me know if this helps
Ed
QUOTE(Gibbons @ Dec 7 2007, 07:46 PM) *
Php Captcha and GD

I have managed to create my own php captchas using php and GD, however I was wondering how to go about changing the orientation of the text. Does anyone know what to do?

I want to produce something similar to the curving shown below:
Click to view attachment

Thanks very much. wink.gif


Yeah for simple rotation's Glenn's posted the link.

But for google like captcha's I'm pretty sure the majority of these are done via custom distortion algorithms, doing it on a pixel by pixel basis; you could also use imagemagick, but the issue with just throwing it through imagemagick is someone can reverse the effects with the right variables.

There's quite detailed information on image algorithms here : ftp://rtfm.mit.edu/pub/faqs/graphics/algorithms-faq it's by no means an easy read though and largely relates to C but you might find some insight.

Recaptcha is fantastic though and pretty straight forward to implement (plus you're helping translate books!). http://www.recaptcha.net
Andrew
QUOTE(Bread @ Aug 20 2008, 07:34 PM) *
Recaptcha is fantastic though and pretty straight forward to implement (plus you're helping translate books!). http://www.recaptcha.net

I hate to topic hijack but I can't resist, how is recaptcha.net helping translate books if you "have" to type the words in the image correct. Doesn't that mean they are already translated? Or does that mean if I type the words wrong it still accepts the words as correct?
Alex
It works based on trust. I certainly don't see why someone would constantly type in the wrong word in a captcha. They can hardly think it's a great way to "stick it to the man" or whatever.

However, what they can do to improve results is to send the same bit of text out to two or three people, and only white flag it if the same result is given three times. The issue with that of course being that it halves or worse the speed at which works can be translated, but it does add an extra safeguard for correctness.
Jetteh22
I agree w/ Trippin. I've never really understood this. How are you helping translate books exactly?

It does not let you type in the wrong word (completely wrong). I will have to go and try to do it maybe one or two chars off and see how it does it then. Because in order for the computer to know if we're typing the word it would have to knwo if the word we're typing is right - which to me would mean that it takes the "majority" of users inputs and compares yours to theirs so if it's "correct" or "close enough" it will work.. No clue.

Neways..

I'd say 1/4 of the words on ReCaptcha I can't even read myself, or aren't words at all - just jumbled up garbage. There are a few other free ones out there.


EDIT:

No it doesn't work completely.
I went to the website and "correctly" identified two words that I incorrectly types on purpose.

The first word was "idol" which I typed as ido1 - It said correct.
The seconds word was "speaking" which i typed as "speakin6" which was also correct...

But both were wrong. Therefor I just don't "trust" recaptcha as it "trusts" users/bots... The whole point of having a auth code is because you can't trust people online.
Alex
Just checked the about page, this is exactly what they do:

QUOTE
But if a computer can't read such a CAPTCHA, how does the system know the correct answer to the puzzle? Here's how: Each new word that cannot be read correctly by OCR is given to a user in conjunction with another word for which the answer is already known. The user is then asked to read both words. If they solve the one for which the answer is known, the system assumes their answer is correct for the new one. The system then gives the new image to a number of other people to determine, with higher confidence, whether the original answer was correct.
Jetteh22
It lies alex.

I am not trying to be mean by incorrectly typing the words but so far I've translated BOTH words incorrectly and it's said they were correct.

I was only 1 character off on each one but they were still listed as correct, which is wrong.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.