CAPTCHA protection using PHP

Do you want to share WYSIWYG Web Builder tips, tricks, tutorials or useful HTML code? You can post it here...
(no questions or problems please, this section is not monitored by support).
Forum rules
This section is to share tips, tricks and tutorials related to WYSIWYG Web Builder.
Please do not post questions or problems here. They will not be answered.

PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
User avatar
chattd
 
 
Posts: 44
Joined: Wed Nov 26, 2008 7:03 pm

Post by chattd » Sat Jan 03, 2009 7:21 pm

Hi
Have it working now but it is saying the code you entered is wrong

User avatar
kees
 
Posts: 49
Joined: Mon May 23, 2005 7:36 pm
Location: Soest - NL

Post by kees » Sat Jan 03, 2009 8:20 pm

The Edit Box name should be named captcha_code, but in your form is has an extra space (shown as #): captcha_code#.

Please remove that extra space.

User avatar
chattd
 
 
Posts: 44
Joined: Wed Nov 26, 2008 7:03 pm

Post by chattd » Sat Jan 03, 2009 8:27 pm

Thank you so much for all your help

User avatar
iamafireman
 
 
Posts: 89
Joined: Mon May 26, 2008 2:41 am
Location: Tennessee

Post by iamafireman » Sat Jan 03, 2009 10:18 pm

i have done this once and all went well, I tried it again for a different site and i cannt get the image to show.
http://ttmptest.info/Availability.php

User avatar
kees
 
Posts: 49
Joined: Mon May 23, 2005 7:36 pm
Location: Soest - NL

Post by kees » Sat Jan 03, 2009 10:36 pm

I think you forgot to upload the font file.

Or the font file is not spelled correctly. The font name must be spelled exactly as in the script.

User avatar
iamafireman
 
 
Posts: 89
Joined: Mon May 26, 2008 2:41 am
Location: Tennessee

Post by iamafireman » Sun Jan 04, 2009 12:13 am

i have the font loaded its arial.ttf and thats what in captcha.php I have read through all 6 pages and still missing something

User avatar
kees
 
Posts: 49
Joined: Mon May 23, 2005 7:36 pm
Location: Soest - NL

Post by kees » Sun Jan 04, 2009 9:04 am

When I call captcha.php directly in the url bar it shows this error message:
Warning: imagettftext(): Could not read font in /home/content/d/o/n/donnajarrett/html/ttmptest/captcha.php on line 29

Warning: imagettftext(): Could not read font in /home/content/d/o/n/donnajarrett/html/ttmptest/captcha.php on line 31
So there must be something wrong with that font file.

When I call arial.ttf directly in the url bar a message indicates that the file is not a valid font file.

User avatar
Navaldesign
 
 
Posts: 905
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Post by Navaldesign » Tue Jan 06, 2009 10:52 pm

Only one captcha per page is possible, unless you modify the script.

However, i don't see how you have used more than one forms in the same page with Form Wizard. Did you use a separate script ?
www.dbtechnosystems.com

User avatar
Navaldesign
 
 
Posts: 905
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Post by Navaldesign » Wed Jan 07, 2009 10:57 pm

Ok, here is a fast one. It takes care of multipe departments (actually unlimited...) using a dropdowm.

You can test it at http://www.dbtechnosystems.com/wb5/contact_multiple.php

And you can download it at http://www.dbtechnosystems.com/wb5/mult ... tments.wbs

Please note that this script combines the method described in viewtopic.php?t=14938 with your requirements.

The code in the form page Start of Page should not be changed. Neither should the value of the hidden field.

The processing script is in the page confirm1.php
Please note that you will need to add here the email addresses. You will see the code:



$subject = 'New Submission from our Mulriple Department Website form';
$message = 'Values submitted from web site form to department: '.$_POST['department'];
$error_url = 'errorpage1.php';

$address['Sales'] = "sales@yourdomain.com";
$address['Warranty]' = "warranty@yourdomain.com";
$address['Manufacturing'] = "manufacturing@yourdomain.com";

$department_error = "Invalid department selection!<br>";// You can change this as required


Customize the parts in red as required.

Please note that i have used three departments in the listbox: Sales, Warranty, Manufacturing (taken from your page).

The values in the square brackets MUST be exactly as the values in the form combobox. The email addresses MUST be, for each one, the email address where you want the mail to be sent.

You can also cusomize the Subject, start of the message, and the error hat will be displayed (though it NEVER should) if the email address is not found due to a mistype.
Last edited by Navaldesign on Fri Jan 09, 2009 6:52 am, edited 1 time in total.
www.dbtechnosystems.com

User avatar
kees
 
Posts: 49
Joined: Mon May 23, 2005 7:36 pm
Location: Soest - NL

Post by kees » Mon Jan 19, 2009 5:13 pm

Yes, it will work.

One remark about your form: Using the built-in form processor, you should have a field named email (lower case). Yours is named Email.

User avatar
Navaldesign
 
 
Posts: 905
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Post by Navaldesign » Mon Jan 19, 2009 8:12 pm

If spammers have already got your email address from the site, and send you spam directly (not through your form) there is no way to stop them.

I suggest installing on your PC Windows Live Mail instead of the classic Outlook Express, as it has pretty good spam filters and gets continously updated with the newest spam servers lists.
www.dbtechnosystems.com

madjamonline
 
 
Posts: 51
Joined: Tue Jun 19, 2007 4:27 pm
Location: United Kingdom
Contact:

Post by madjamonline » Wed Mar 11, 2009 9:43 pm

CAPTCHA is so that robots or non-humans cannot submit the form. However, I recon technology is developing to read images! If you just did a simple plain text question, the robot could read the html to find the answer!

User avatar
bry
 
 
Posts: 333
Joined: Fri Jan 11, 2008 8:44 pm

Post by bry » Tue Jun 23, 2009 9:57 pm

A very clear example of why this is absolutely THE BEST FORUM on the internet. No where else will you find so many very, very smart people so willing to help beginners. WB continues to amaze me.

Post Reply