![]() |
How can I prevent spam comments ? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: How can I prevent spam comments ? (/showthread.php?tid=42356) |
How can I prevent spam comments ? - El Forum - 06-05-2011 [eluser]Keloo[/eluser] Hi, I want to write a function in CI that checks if a certain comment exists in the db, and if it does to display a message something like "This comment was flagged as spam ". I've done it, but if I change a letter in that comment, it will be posted. So my question is, how can I make it more secure then this, to prevent spam comments ? Here is the current code : Controller Code: function comment_check($str) Model Code: function comment_check($comment) How can I prevent spam comments ? - El Forum - 06-05-2011 [eluser]adityamenon[/eluser] What's wrong with CAPTCHA? Did you try using Recaptcha? There's even a handy library in CI that integrates ReCaptcha... I use it extensively with great effect. |