Jump to content

stawkerm0h

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

stawkerm0h's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks sir sasa i already figure out how to filter the topic title... thanks a lot sir sasa
  2. thanks sir sasa... it work perfectly......... and you save us because it's our thesis.... but one more thing sir sasa on our topic title since our thesis is a forum that filter bad words can you configure my code so that my topic title can also filter "motherfucker" into "mother******" here's my code sir sasa.... echo "<tr><td valign='top' style='border: 2px solid #000000;'><div style='min-height: 100px;'>".filter_words($row['topic_title'])."<br />by ".$row2['post_creator']." - ".$row2['post_date']."<hr />".filter_words($row2['post_content'])."</div></td><td width='200' valign='top' align='center' style='border: 2px solid #6F0000;'>User Info Here</td></tr><tr><td colspan='2'><hr /></td></tr>"; this line filter our post content ".filter_words($row2['post_content'])." but how in our topic title...because i tried that my topic title would be motherfucker and it's not filtering ".filter_words($row['topic_title'])." can you help me again sir sasa thanks
  3. anyone could help me?
  4. what i want to do is that only root words is on my database... but when i type "superfuck" and the word "fuck" is on my database it will be filtered into "super****" or "motherfuck" will be filtered into "mother****"....anyone could help me in coding??
  5. i got an error at line 36... it says "Deprecated: Function eregi() is deprecated in C:\xampp\htdocs\try2.php on line 36" and anyone who can help me to correct MY codes.... darkfreaks, i can't understand your codes i'm just starting studying php... so if you can...just help me to correct MY codes and thank you for reply please help
  6. i currently have this code...i got a problem calling out words from my database....my database name is "bad_replace" and the list of my bad words is "word"....my codes only pick out some of my bad words out of database and not all what i declared on my database....like when i post the word "motherfucker" it becomes "mother******" but if i post "tanga" which a bad word from our country it doesn't replace into "*****" since that word is also on my database.......please help... thanks..... <?php include('connect.php'); function swear_filter($string) { $bad_words = array(); $sql = mysql_query("SELECT * FROM bad_replace"); if (mysql_num_rows($sql) > 0) { while ($row = mysql_fetch_assoc($sql)) { $bad_words[] = '/\b' . $row['word'] . '\b/i'; $replacement[] =$row['replacement']; } } } $string_to_check = ""; $completed_filter = ""; $finished_filter = ""; if ($_POST['submit']) { echo swear_filter($_POST['string']); } ?> <hr /> <center><form action='swear_filter.php' method='POST'> <br><textarea name='text' rows="10" cols="75></textarea><br /> <input type='submit' name='submit' value='Post'></p></center> </form>
  7. what is the value for the new table "word"... is it varchar??primary,not null and auto-increment?
  8. what do this code do??please explain $wordlist = "sh%t:cr*p|dang:d*ng|shoot:sh**t"; and also this one?? please explain too $seperate_text = "|"; $entry_seperate_text = ":"; while($row = mysql_fetch_array($search_for_bad_words)) { $wordlist = $wordlist.$seperate_text.$row[word].$entry_seperate_text.$row[r_word]; }
  9. what will be the value for new word table and what will be it's name? "word"?? and the value?? here's my database and here's the list of my bad words please help thanks
  10. do i need to create another database for this?? because i already have the database of bad words... if i need to create new....please help how and what will be the value for each field... <?php include('../../includes/inc.conn.php'); function swear_filter($string) { $words = array(); $query = "SELECT word FROM bad_words"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ $words[] = '/\b' . $row['word'] . '\b/i'; } return preg_replace($words, '***', $string); } $string_to_check = "My shitzu took a Shit on the carpet."; echo swear_filter($string_to_check); //Assuming the word 'shit' is in the db results //Output: "My shitzu took a *** on the carpet" ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.