silverglade Posted August 7, 2008 Share Posted August 7, 2008 hi, i made a web forum message board and someone posted porn words on it so i had to remove the forum from my server. i need a way to delete posts, email registratoin and password, and block porn keywords in the messages. does anyone know of a link that teaches this.? i cant find one , only for password. any help greatly appreciated. thanks . derek Link to comment https://forums.phpfreaks.com/topic/118629-security-for-my-php-forum/ Share on other sites More sharing options...
blirette Posted August 7, 2008 Share Posted August 7, 2008 Should be simple but long. Make SQL queries with an array that contains all those filthy keywords. Run the queries, store the informations (IDs) in an array and delete all the bad things after with a good ol' DELETE! That's how I'd do it. Link to comment https://forums.phpfreaks.com/topic/118629-security-for-my-php-forum/#findComment-610795 Share on other sites More sharing options...
lemmin Posted August 7, 2008 Share Posted August 7, 2008 I think it would make more sense to catch these things before you put them into your DB. Preg_replace() would probably be the best method of doing this. On your insert query, do something like this: $badwords = array("porn", "meecrab"); qry = "INSERT INTO table (Content) VALUES ('".preg_replace($badwords, "@$#!", $content)."')"; Link to comment https://forums.phpfreaks.com/topic/118629-security-for-my-php-forum/#findComment-610802 Share on other sites More sharing options...
silverglade Posted August 7, 2008 Author Share Posted August 7, 2008 thanks. is there a way i can delete posts? this guy put a ton of porn words into my forum, probably someone from this forum. derek Link to comment https://forums.phpfreaks.com/topic/118629-security-for-my-php-forum/#findComment-610827 Share on other sites More sharing options...
lemmin Posted August 7, 2008 Share Posted August 7, 2008 As blirette suggested, you can use DELETE with LIKE: $qry = "DELETE FROM table WHERE content LIKE '%porn%' OR content LIKE '%meecrab%'"; Keep putting ORs for however many words you want to look for. Link to comment https://forums.phpfreaks.com/topic/118629-security-for-my-php-forum/#findComment-610842 Share on other sites More sharing options...
waynew Posted August 7, 2008 Share Posted August 7, 2008 MEECRAB? Link to comment https://forums.phpfreaks.com/topic/118629-security-for-my-php-forum/#findComment-610904 Share on other sites More sharing options...
lemmin Posted August 7, 2008 Share Posted August 7, 2008 Sorry, meecrob. http://en.wikipedia.org/wiki/Meecrob The South Park reference is how I was relating it to this topic. Link to comment https://forums.phpfreaks.com/topic/118629-security-for-my-php-forum/#findComment-610912 Share on other sites More sharing options...
silverglade Posted August 7, 2008 Author Share Posted August 7, 2008 every time i load my forum now, that guy's porn messages come up and i cant delete it. is there a way to delete his posts? like going to the database or something? thanks , derek Link to comment https://forums.phpfreaks.com/topic/118629-security-for-my-php-forum/#findComment-610983 Share on other sites More sharing options...
lemmin Posted August 7, 2008 Share Posted August 7, 2008 The SQL I posted is how you are supposed to delete his posts. Or, if he used the same name in all the posts, use that as the criteria for the deletes. If you want to visually delete them, you can get the MySQL Administrator Tools: http://dev.mysql.com/downloads/gui-tools/5.0.html Link to comment https://forums.phpfreaks.com/topic/118629-security-for-my-php-forum/#findComment-611123 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.