RE: [PHP] dirty words
| From: | Chris Kay | Date: | Sat, 16 Oct 2004 14:51:04 +0000 |
| Subject: | RE: [PHP] dirty words | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-199633@lists.php.net to get a copy of this message | ||
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)
chris@eleet.com.au
-----Original Message-----
From: Mag [mailto:genphp@yahoo.com]
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