WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-16-2006, 04:16 AM
mantawebsolutions's Avatar
mantawebsolutions mantawebsolutions is offline
WebProWorld Veteran
 

Join Date: Jun 2004
Location: Pretoria, South Africa
Posts: 306
mantawebsolutions RepRank 0
Default Proper PHP form validation to stop SPAM

Can someone direct me to where i can find an easy way to stop automated submissions from occuring via my website's enquiry form.

if you want to take a look at my form go to w*w.mantawebsolutions.com/contactus.php

The validation uses JS as can be seen here: w*w.mantawebsolutions.com/enquiry-validate.js

any help will be fantastic, thanks
Reply With Quote
  #2 (permalink)  
Old 08-16-2006, 06:11 AM
irodgers irodgers is offline
WebProWorld Pro
 

Join Date: Aug 2003
Location: UK
Posts: 132
irodgers RepRank 0
Default Strip out anything that can be interpreted by php

Strip out anything that can be interpreted by php. I only realised this myself a few days ago. Spammers were using my enquiry form and were putting php scripts into the actual text box. So use -

stripslashes()
strip_tags()
escapeshellcmd()
htmlspecialchars()

Those are php commands by the way.

I think that should do it.
__________________
Markgreat
Homes by Speyside
Tickets!
Reply With Quote
  #3 (permalink)  
Old 08-16-2006, 07:42 AM
mantawebsolutions's Avatar
mantawebsolutions mantawebsolutions is offline
WebProWorld Veteran
 

Join Date: Jun 2004
Location: Pretoria, South Africa
Posts: 306
mantawebsolutions RepRank 0
Default

thanks irodgers. i am using stripslashes() in my form action but not the others, will find out how to correctly apply them
Reply With Quote
  #4 (permalink)  
Old 08-16-2006, 09:52 AM
stymiee's Avatar
stymiee stymiee is offline
WebProWorld Veteran
 

Join Date: May 2006
Location: New Jersey
Posts: 431
stymiee RepRank 0
Default

You need to use CAPTCHA
__________________
John Conde
Brainyminds Merchant Account Services eBook Giant
Reply With Quote
  #5 (permalink)  
Old 08-16-2006, 11:02 AM
irodgers irodgers is offline
WebProWorld Pro
 

Join Date: Aug 2003
Location: UK
Posts: 132
irodgers RepRank 0
Default W3C

Quote:
Originally Posted by stymiee
You need to use CAPTCHA
w3 has a bit of a dislike of CAPTCHA - see -

http://www.w3.org/TR/turingtest/
__________________
Markgreat
Homes by Speyside
Tickets!
Reply With Quote
  #6 (permalink)  
Old 08-16-2006, 12:05 PM
Webnauts's Avatar
Webnauts Webnauts is offline
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Worldwide
Posts: 6,986
Webnauts RepRank 3Webnauts RepRank 3
Default Thread moved

Thread moved here...
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: form, php, proper, spam, stop, validation



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

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



Search Engine Friendly URLs by vBSEO 3.0.0