Cutenews Anti-Spam Protection


RULES
oo1. Please do NOT copy this tutorial in any way.
oo2. Please do not claim this as yours.
oo3. Credit is REQUIRED. Link 4w4 visibly on your site if this tutorial has helped you.

A lot of people don't use Cutenews because it is easy to spam. So if you still want to use Cutenews but are afraid of getting tons of Spam, then try this tutorial. If you want to see an example of this in advance, click here.

tutorial credit: here

Go to cutenews > inc > shows.inc.php


Look for this Code: $name = trim($name);
$mail = trim($mail);


And Add this Code:
$new = trim($_POST['new']);


Look for this Code:
if( strlen($name) > 50 ){
echo"<div style=\"text-align: center;\">Your name is too long!</div>";
$CN_HALT = TRUE;
break 1;
}


And Add this Code:
if( strlen($new) > 50 ){
echo"<div style=\"text-align: center;\">Your write too long!</div>";
$CN_HALT = TRUE;
break 1;
}


Look for this Code:
$comments = replace_comment("add", $comments);
$name = replace_comment("add", preg_replace("/\n/", "",$name));
$mail = replace_comment("add", preg_replace("/\n/", "",$mail));


And Add this Code:
$new = replace_comment("add", preg_replace("/\n/", "",$new));


Look for this Code:
Password: <input type=\"password\" name=\"password\" />


And Add this Code:
<input type=\"hidden\" name=\"new\" value=\"$new\" />


Look for this Code:
if($name == " " or $name == ""){
echo("<div style=\"text-align: center;\">You must enter name.<br />
<a href=\"javascript:history.go(-1)\"> go back </a> </div>");
$CN_HALT = TRUE;
break 1;
}


And Add this Code:
Replace "Your Word" with the word of your choice.
if($new == "YOUR WORD" or $new == "YOUR WORD" ){ $ok = TRUE;}
else
{ echo("<center>You must type <b>YOUR WORD</b>.<br />
<a href=\"javascript:history.go(-1)\"> go back </a> *lt;/center>");
$CN_HALT = TRUE;
break 1;
}


Go to your Comment Form


And Add this Code:
Replace "Your Word" with the word of your choice.
<tr>
<td width="49" height="1"> <font color="red">Say <b>YOUR WORD</b></font>:
</td>
<td width="289" height="1"><input type="text" name="new" tabindex="1"></td>
</tr>





<<Rewind|Forward>>

Everything here is ©4w4.org. Please don't steal.