if(stristr( $file_data, $word )) die( "word found" );
that will work for one word -- for many words -- I would use:
if(preg_match("/word1|word2|word3/i", $file_data)) die( "one or more words
found" );
However, that does use preg -- which is MUCH faster than EREG but neither is
as fast as a straight out text search.
if you go the preg route you need to make sure you form your expression
correctly... but for words ... just | will do you fine.
-Joe
"Martin Kampherbeek" <[EMAIL PROTECTED]> wrote in message
006701c1cecb$806e9be0$[EMAIL PROTECTED]">news:006701c1cecb$806e9be0$[EMAIL PROTECTED]...
Hi,
Someone submits an URL to me. Now I want a script that checks for some words
in the file right after submitting. When the word is in the file it must
stop.
For example the words: house and school.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php