Hey guys,
How can I add CAPTCHA in a regular .php mailform ?
Hey guys,
How can I add CAPTCHA in a regular .php mailform ?
Uh... that's complex.
You need to use the GD library to dynamically generate an image based on input and then later compare that original input to what the user types. Furthermore, you need to create it with distortion so a computer can't read it.
As I said, complex.
You could alternatively have images you created by hand (say 10 of them might work for a small site) and corresponding 'correct' values for them that would later be matched. Be sure never to output that value, just keep it secure in the php code.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Read this thread.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
http://chovy.dyndns.org/php/captcha.php
just did this one in a few hours. although most of that time was looking for a TTS library.
It's probably not worthy of a high-traffic site, as I'm not tweaking the text or background (yet anyway).
Most decent servers already have a GD library installed, and I found a nice little file that will tell you, you can download it below.
Just rename it to gd-test.php, upload to your domain, browse to the page and view the results. If you have it then no need for all the extra worrying![]()
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
Thanks guys.
What code do I need to add to the mailform ?
what language is it in?
html sending to a php
Festival will serve your purposes. Run it against a Sable XML file or a Scheme script, not just plain text: this will allow you more control over the factors required for transformation.just did this one in a few hours. although most of that time was looking for a TTS library.It won't even provide a barrier. There are freely-available CAPTCHA breakers out there that will crack that with a 100% success rate in milliseconds.It's probably not worthy of a high-traffic site, as I'm not tweaking the text or background (yet anyway).
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
What code do I need to add to the mailform in order to get a capcha ? The form is made in .html submitting to a .php.
Bookmarks