Thanks a lot Alex. I used this technique to convert text emoticons into image tags with the appropriate image for my guestbook and blog. Keep up the awesome work!
the problem with this swear filter is that it will filter out words from the array that appear within other words. For example if you design your filter to replace "Cock" with "Cockerel" then the word peacock will be changed to "peacockerel", which obviously is not the desired effect. There must be a way to replace only whole words.
thanks good tutorial is it possible to change the arrays to text documents? lets say sweararray will look for swear.txt (text doc with swear words in) and replacearray will look for replace.txt (text doc with replacements) IS THIS POSSIBLE? thx
If you don't want to replace the bad word with specific text (but just general text i.e. XxXxX for all bad words) is there a shorter code to do? I came across this but it has errors in the ereg() replace:
In addition, it's not swearing in the USA and is also a main part of the vocabulary in Australia (not swearing). In the UK does the word "bloody" qualify as swearing? Only the Macmillan Dictionary says it is "impolite", Collins says "slang" (thus not swearing), as does OED, Chambers says it is an "adjective" thus not even slang let alone swearing slang. Do all swearwords even have to be "slang"? I have no idea. However, three quarters of the population think it is swearing (but 1/4 don't).
"Bloody" isn't mild to 2% of people: 2% consider it strong. Neither is it a swearword, according to 22%. Advertising research also found that, when two versions of an advertisement were shown to two groups, one using "bloody", the other using "bl**dy", slightly more people from the group that saw the asterisked version objected than the number from the group who saw the word. So the asterisked version is 'officially' worse and I therefore challenge the reasoning behind the filter
Thanks
maxtemerario 2 months ago
Alex: "If shit is found"
PHP: "I've found tons"
MsMangoPie 2 months ago
Thanks a lot Alex. I used this technique to convert text emoticons into image tags with the appropriate image for my guestbook and blog. Keep up the awesome work!
rampagetv 3 months ago
#LOL
matterhornbobsleds1 7 months ago
The video player turned black when I had my filter on!
That's not swearing, That's Racism!
ShinkoNet 7 months ago
Replaced Bloody with blood. Shit with spill.
I don't give a blood spill!
Acceptable76 8 months ago
the problem with this swear filter is that it will filter out words from the array that appear within other words. For example if you design your filter to replace "Cock" with "Cockerel" then the word peacock will be changed to "peacockerel", which obviously is not the desired effect. There must be a way to replace only whole words.
arumdevil 9 months ago in playlist PHP Tutorials
Another GREAT tutorial, i use the example to replace smiles with images.
n0b0dy241 11 months ago
*Good
sa5tta 1 year ago
Google explanation, thanks.
sa5tta 1 year ago
thanks good tutorial is it possible to change the arrays to text documents? lets say sweararray will look for swear.txt (text doc with swear words in) and replacearray will look for replace.txt (text doc with replacements) IS THIS POSSIBLE? thx
maxy125 1 year ago
If you don't want to replace the bad word with specific text (but just general text i.e. XxXxX for all bad words) is there a shorter code to do? I came across this but it has errors in the ereg() replace:
?php
$bad_words = explode('\|', 'badword1|badword2|etc');
foreach ($bad_words as $naughty)
{
$comments = eregi_replace($naughty, "XxXxX", $bad_words);
}
?
smatthewsauthor 1 year ago
watching this video witht the transcribe audio feature is quite funny!
MegaInstrumentals 1 year ago
there is a function in php where you can have the array point like
"shit" -> "sh*t"
too lazy to explain.
and you can use ucfirst(); which captialises the first letter
brokenbylaw2 1 year ago
Fuck man, can you take the filter off of youtube? This new swear filter is bloody shit
19jojo93 2 years ago
i think this is good
lazypig22 2 years ago
In addition, it's not swearing in the USA and is also a main part of the vocabulary in Australia (not swearing). In the UK does the word "bloody" qualify as swearing? Only the Macmillan Dictionary says it is "impolite", Collins says "slang" (thus not swearing), as does OED, Chambers says it is an "adjective" thus not even slang let alone swearing slang. Do all swearwords even have to be "slang"? I have no idea. However, three quarters of the population think it is swearing (but 1/4 don't).
Website1643 2 years ago
Good point but this is not an issue for this video purpose. You may need to think
why people will watch this video.
bulgaring 2 years ago
"Bloody" isn't mild to 2% of people: 2% consider it strong. Neither is it a swearword, according to 22%. Advertising research also found that, when two versions of an advertisement were shown to two groups, one using "bloody", the other using "bl**dy", slightly more people from the group that saw the asterisked version objected than the number from the group who saw the word. So the asterisked version is 'officially' worse and I therefore challenge the reasoning behind the filter
Website1643 2 years ago
I didn't create this filter so people could filter the word bloody, I used it as an example as I have younger audience too,
phpacademy 2 years ago 14
@phpacademy As I always said, you are rock man. please keep it up
am84pm 6 months ago
@phpacademy As I always said, You are rock ! pls keep it up man.
am84pm 6 months ago
Website1643 (5 months ago)
is trolling ignore him....
Straighten88 2 years ago 3
Haha... This was clever!
omanoman98 2 years ago