December 29, 200817 yr Hello, Does anyone know how I could make a Captcha for anti-spam ? Or anything else against spam, because the feedback section of my site is beeing spammed down : http://www.manoelmanach.com/feedback.php I found a tutorial and I'm gonna try it, but if these are not bots but real people, it won't change anything. If you have any other tipps please help me . Thanks, Revs.
December 29, 200817 yr Author Thanks, I also found this : http://www.askapache.com/security/php-capt...am-example.html But I don't know how to use it.. it's not explained very well. Well thanks, I'm gonna take a look at your link.
December 29, 200817 yr Or add an additional field with a questions such as "What colour is the sky" and set some validation on that field on submit that checks for the right answer (i.e.: blue). This is probably easier to implement than CRAPTCHA and easier for genuine users.
December 29, 200817 yr a questions such as "What colour is the sky" ... the right answer (i.e.: blue). But in the UK, the answer "grey" is equally (probably more) viable
December 29, 200817 yr But in the UK, the answer "grey" is equally (probably more) viable yes that could become a bit of a problem.
December 30, 200817 yr Author a questions such as "What colour is the sky" ... the right answer (i.e.: blue). But in the UK, the answer "grey" is equally (probably more) viable Or add an additional field with a questions such as "What colour is the sky" and set some validation on that field on submit that checks for the right answer (i.e.: blue). This is probably easier to implement than CRAPTCHA and easier for genuine users. Well that's what I wanted to do, but I don't really know how that works. But I think I'm still gonna try that first. Could anyone help me with the script ? That's what the script looks like : <div id="content"> <div> <h3 id="feedback-title">FEEDBACK</h3> <?php mysql_connect("localhost", "root", "root"); mysql_select_db("MM48"); if (isset($_POST['username']) AND isset($_POST['message'])) { $username = mysql_real_escape_string(stripslashes(htmlspecialchars($_POST['username']))); $message = mysql_real_escape_string(stripslashes(htmlspecialchars($_POST['message']))); $message = nl2br($message); $mail = mysql_real_escape_string(stripslashes(htmlspecialchars($_POST['mail']))); $mail = nl2br($mail); $site = mysql_real_escape_string(stripslashes(htmlspecialchars($_POST['site']))); $site = nl2br($site); mysql_query("INSERT INTO feedback VALUES('', '" . $username . "', '" . $message . "', '" . $mail . "', '" . $site . "', '" . time() . "')"); } $nombreDeMessagesParPage = 5; $retour = mysql_query('SELECT COUNT(*) AS nb_messages FROM feedback'); $donnees = mysql_fetch_array($retour);$totalDesMessages = $donnees['nb_messages']; $nombreDePages = ceil($totalDesMessages / $nombreDeMessagesParPage); echo ''; for ($i = 1; $i <= $nombreDePages; $i++) { echo '<div class="fb-page-box"><a href="feedback.php?page=' . $i . '" class="fb-page" title="» Gehe zur Seite ' . $i. '">' . $i . '</a></div>'; } ?> <br /> <br /> Wenn Sie möchten, können Sie mir gerne ein Feedback hinterlassen. Dazu können Sie mir eine <a href="kontakt.php">E-Mail senden</a>, oder das Formular, welches sich <a href="#feedback-schreiben">unten</a> befindet benützen ( Dadurch wird das Feedback auf der Seite veröffentlicht und kann von Allen gelesen werden ). <br /> <br /> <?php if (isset($_GET['page'])) { $page = $_GET['page']; } else { $page = 1; } $premierMessageAafficher = ($page - 1) * $nombreDeMessagesParPage; $reponse = mysql_query('SELECT * FROM feedback ORDER BY id DESC LIMIT ' . $premierMessageAafficher . ', ' . $nombreDeMessagesParPage); while ($donnees = mysql_fetch_array($reponse)) { /* Name der Tage auf deutsch */ /* Name of days in German */ $name_tag[0] = "Sonntag"; $name_tag[1] = "Montag"; $name_tag[2] = "Dienstag"; $name_tag[3] = "Mittwoch"; $name_tag[4] = "Donnerstag"; $name_tag[5] = "Freitag"; $name_tag[6] = "Samstag"; /* Name der Monate auf deutsch */ /* Name of months in German */ $name_monat[1] = "Januar"; $name_monat[2] = "Februar"; $name_monat[3] = "März"; /* M? d?aber auch funktionieren */ $name_monat[4] = "April"; $name_monat[5] = "Mai"; $name_monat[6] = "Juni"; $name_monat[7] = "Juli"; $name_monat[8] = "August"; $name_monat[9] = "September"; $name_monat[10] = "Oktober"; $name_monat[11] = "November"; $name_monat[12] = "Dezember"; $num_tag = date( "w"); $num_monat = date( "m"); /* Test, ob der aktuelle Monat < 10 ist */ /* Is the current month < 10th month */ $test = substr($num_monat,0,1); if ($test == "0") { $num = substr($num_monat,1,1); $num_monat = $num; } $jahr = date( "Y"); $n = date( "d"); $tag = $name_tag[$num_tag]; $monat = $name_monat[$num_monat]; setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge'); echo '' . $donnees['message'] . '<br /> <span class="fb-info">Gesendet von ' . $donnees['username'] . ' am ' . strftime('%A, ', $donnees['timestamp']) . ' dem' . strftime(' %d. %B %Y', $donnees['timestamp']) . ' um ' . strftime('%H:%M', $donnees['timestamp']) . ' | <a href="#" class="fb-under-links"><img src="style/default/images/up.gif" alt="Nach Oben" title="Nach Oben" /></a> <a href="#feedback-schreiben" class="fb-under-links"><img src="style/default/images/down.gif" alt="Nach Unten" title="Nach Unten" /></a> | <a href="' . $donnees['site'] . '" class="fb-under-links" target="_blank">' . $donnees['site'] . '</a></span><div class="fb-split"></div>'; } mysql_close(); ?> <br /> <br /> <form method="post" action="feedback.php" id="feedback-schreiben"> <table id="feedback-tb"> <tr> <td class="td-fb"><center>Name</center></td> <td class="td-fb"><input name="username" class="form-fields" /></td> </tr> <tr> <td class="td-fb"><center>E-Mail</center></td> <td class="td-fb"><input name="mail" class="form-fields" /> <span style="font-size: 9px;">( Wird nicht angezeigt )</span></td> </tr> <tr> <td class="td-fb"><center>Webseite</center></td> <td class="td-fb"><input name="site" class="form-fields" /></td> </tr> <tr> <td class="td-fb"><center>Feedback</center></td> <td class="td-fb"><textarea name="message" rows="13" cols="100" id="feedback-textarea"></textarea></td> </tr> <tr> <td class="td-fb"></td> <td class="td-fb"><input type="submit" value="Abschicken" class="submit" /> <input type="reset" value="Felder zurücksetzen" class="submit" /></td> </tr> </table> </form> </div> </div> Revs.
Create an account or sign in to comment