Hi to all,
thank you again for the answers, and since you helped me, I think it proper to share the result.
If anything were to serve to someone else.
I have pondered for a couple of days, and I created this function.
Code:
<?
function rand_word($text) {
//array words
$words_array = array(
array("ass", "butt", "booty", "butthole", "analy"),
array("test1", "test2", "test3", "test4", "test5"),
);
//esplodo spazi
$explode_space = explode(" ", trim($text));
//ciclo parole esplose
foreach($explode_space as $key_explode => $value_explode){
//ciclo tutti gli arrau con le parole
foreach($words_array as $key => $value){
//cercho nell'array
$words_search = array_search(strtolower($value_explode), $words_array[$key]);
//se trovo word
if($words_search !== false){
//seleziono random da array interno
$rand_keys = array_rand($words_array[$key], 2);
$rand_word = $words_array[$key][$rand_keys[0]];
$text = str_replace($value_explode, $rand_word, trim($text));
} //close if
} //close foreach
}
return ucfirst($text);
}
echo rand_word("The ass party test1");
?>
This function creates an array that contains a number of other arrays, which in turn contain a list of similar words.
Explodes text that is passed, look for the word exploded inside the array, if found, replaces it with a similar one.
Now the list of missing words, but I should be able to create a nice list with the sites that you have spent.
Thanks again to everyone.