1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
<?
//antispam n1bus
$Spam = array( "cialis",
"viagra",
"casino",
"porn",
"movie",
"anal",
"sex",
"fuck",
"invest",
"market",
"estate",
"financing",
"funds",
"properties",
"pussy",
"banners",
"cock",
"earnmoney",
"acquaintance",
"credit-card",
"blogspot",
"ecash",
"enlargement",
"enlarge",
"pills",
"breast",
"surgical",
"http",
"www");
//liste à compléter par vos soins
$xmessage = strtolower($Le_champ_du_formulaire_a_verifier);
$nb_spam = 0;
foreach ($Spam as $value) { //on vérifie que la chaine ne contient pas de mots interdits
if (preg_match("/$value/i", $xmessage)) { $nb_spam ++;}
}
if($nb_spam > 0){ echo "<b><font color='#FF0000'>SPAMMERS NOT ALLOWED</font></b>";}
else{ // pas de spam
// le reste du traitement du formulaire
}
?> |
Partager