recently i worked on creating for ‘bad words’ filter comment, here is the basic php script
to get the username & api key, visit this url:
https://www.neutrinoapi.com/signup/
$list = “i dont have any fuck shit fucker asshole”;
//$list = ‘iam a good boy’;
$list = urlencode($list);
$words = ‘https://neutrinoapi.com/bad-word-filter?content=’.$list.’&reverse-lookup=true&user-id=USER_ID&api-key=API_KEY=*’;
$konten = file_get_contents($words);$res = json_decode($konten,true);
print_r($res);
// Array ( [bad-words-list] => Array ( [0] => fucker [1] => asshole [2] => fuck [3] => shit ) [censored-content] => i dont have any **** **** ****** ******* [bad-words-total] => 4 [is-bad] => 1 ) yes it’s bad
if($res[“is-bad”])
{
echo ‘yes it\’s bad’;
}else
{
echo ‘no bad found’;
}
Be First to Comment