iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Internet Security Discussion Forum This forum is for the discussion of security related issues. If you find a new Phishing scheme, spyware, virus or malicious site - let us know about it. If any of the above found you... here's where you ask for help.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-20-2008, 02:53 AM
Web-Design-Guy's Avatar
WebProWorld Pro
 
Join Date: Jun 2008
Location: Perth, Western Australia
Posts: 110
Web-Design-Guy RepRank 1
Default Need a secure contact form script (php5)

Can anyone help me out?

Ideally, rather than CAPTCHA, it will ask maths questions or similar.

Here's hoping.
Reply With Quote
  #2 (permalink)  
Old 08-20-2008, 10:36 AM
wige's Avatar
Moderator
WebProWorld Moderator
 
Join Date: Jun 2006
Location: United States
Posts: 2,648
wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9
Default Re: Need a secure contact form script (php5)

Microsoft actually created a pretty interesting CAPTCHA alternative, in conjunction with petfinder.com. The system displays images of cats and dogs, and asks the user to select only the pictures of the cats. You can get more information here: MSR Asirra: A Human Interactive Proof
__________________
The best way to learn anything, is to question everything.
Reply With Quote
  #3 (permalink)  
Old 08-20-2008, 12:14 PM
WebProWorld Pro
 
Join Date: Jan 2008
Posts: 294
Tech Manager RepRank 1
Default Re: Need a secure contact form script (php5)

Quote:
Originally Posted by Web-Design-Guy View Post
Can anyone help me out?

Ideally, rather than CAPTCHA, it will ask maths questions or similar.

Here's hoping.
Here's a simple script that will produce your math questions:

Make sure you have sessions enabled.

Code:
srand ((double) microtime( )*1000000);
$_SESSION['human_check'] = rand(0,999);
$question = ($_SESSION['human_check'] - 1);
$question2 =  "What is the next number after the number " . $question . "?";

Add the question to your form:

Code:
 
<label /><?php echo $question2; ?> <input type="text" name="human_answer" size="3" maxlength="3" value="0" />
Compare the response with your $_SESSION['human_check'] variable.
Code:
 
if($_SESSION['human_check'] == $_POST['human_answer']) {
   $g = TRUE;
 } else {
   $g = FALSE;
   $message[] = "You failed to enter the correct number into the number field.";
   }
Validate the rest of your variables and you're set.
__________________
I use Country IP Blocks as added security for my networks and servers.

Last edited by Tech Manager; 08-20-2008 at 12:17 PM.
Reply With Quote
  #4 (permalink)  
Old 08-20-2008, 09:49 PM
Web-Design-Guy's Avatar
WebProWorld Pro
 
Join Date: Jun 2008
Location: Perth, Western Australia
Posts: 110
Web-Design-Guy RepRank 1
Default Re: Need a secure contact form script (php5)

I really appreciate it Tech Manager.

I'm trying to marry your input with an existing script but I'm not getting the comparison check to work. Everything else seems to function.

I'm a complete php noob - would you mind if I PM you?
Reply With Quote
  #5 (permalink)  
Old 08-20-2008, 11:01 PM
WebProWorld Pro
 
Join Date: Jan 2008
Posts: 294
Tech Manager RepRank 1
Default Re: Need a secure contact form script (php5)

Quote:
Originally Posted by Web-Design-Guy View Post
I really appreciate it Tech Manager.

I'm trying to marry your input with an existing script but I'm not getting the comparison check to work. Everything else seems to function.

I'm a complete php noob - would you mind if I PM you?

I don't mind at all.
__________________
I use Country IP Blocks as added security for my networks and servers.
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Internet Security Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedding a secure form into another HTML page cimmeronstudios Web Programming Discussion Forum 6 05-14-2007 05:09 PM
Need to Build a Contact Form brianzajac Web Programming Discussion Forum 0 06-05-2006 06:20 PM
Contact Form being Hi-jacked - HELP! fisher318 Internet Security Discussion Forum 4 09-12-2005 03:14 PM
PHP - Problems with contact form Biggles Web Programming Discussion Forum 9 01-24-2005 12:51 PM
Creating a Secure Login Script in PHP z01d Web Programming Discussion Forum 9 07-01-2004 01:44 PM


All times are GMT -4. The time now is 08:47 AM.



Search Engine Optimization by vBSEO 3.3.0