Potent Products Forum
Potent Products ForumToday's PostsPrivate Messages

Navigation  
Go Back   Potent Products Forum > Client Services > eMail and Web Mail
User Name
Password

Reply
 
Thread Tools Search this Thread Display Modes
Website Rob is offline      Old Spam prevention of Form scripts #1  
Website Rob's Avatar

Website Rob

Title: Administrator
Join Date: May 2002
Posts: 603


Report Bad PostReply With Quote

View Public Profile Send a private message to Website Rob Visit Website Rob's homepage! Find all posts by Website Rob Add Website Rob to Your Buddy List  
01-07-2006, 09:36 PM

Some time ago, it was discoved that many PHP pages that have anything to do with eMailing could be used to send out Spam. As many Free scripts provide this feature and most people are not familar with how to fix the problem, here is some code that anyone can use.

Quote:
<?php
foreach ( $_POST as $key => $value ) {
if ( stristr( $value, "cc:" ) ) { echo "Sorry, we do not allow cc: in the form."; exit; }
if ( stristr( $value, "bcc:" ) ) { echo "Sorry, we do not allow bcc: in the form."; exit; }
if ( stristr( $value, "content-type:" ) ) { echo "Sorry, we do not allow content-type: in the form."; exit; }
if ( stristr( $value, "mime-version:" ) ) { echo "Sorry, we do not allow mime-version: in the form."; exit; }
}
?>

Put the code at the very beginning of any PHP page that can send eMail. You can also customize it by leaving out the line for 'cc' for example, if your script does have the ability to send 'cc' and you want that option.

This code is not something I came up but did see at another Forum. Seemed like it was easy enough for anyone to use and hope you find it handy.


Also, Free Feedback Form Wizard is an excellent place to go and have a personlized Form made for you. Takes 5 minutes and designed with Security in mind. Both PHP and Perl versions are available and the site comes highly recommended.

If you like the idea of usiing a CAPTCHA image, Mike's Contact script is also available for Free, but somewhat detailed to install.
__________________
The caring is in the sharing. The learning is in the doing.


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Forum Jump


All times are GMT -6. The time now is 05:34 PM.


Back To The Top