in_array() can check your $string against a array and return if a bad word
is in string

Is this what you are after?

Chris Kay (CK)
[EMAIL PROTECTED]


-----Original Message-----
From: Mag [mailto:[EMAIL PROTECTED] 
Sent: Sunday, 17 October 2004 12:41 AM
To: php php
Subject: [PHP] dirty words

Hi,
I am useing file_get_contents on a remote page then using stristr() to make
sure there are no "bad words"
and its a family site.
Right now I am checking for just 3 bad words which means 3 stristr()
function calls, but if the bad words increase then that would mean more
calls....

I have seen some forum software before that used to take an array of bad
words and check it against the post, anybody have an idea what that function
would be like coz I am pretty sure I am going about this the wrong way...php
has a simple solution to most of these problems...

Thanks,
Mag

=====
------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)


                
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to