if (strpos("<SCRIPT LANGUAGE = Javascript>",$input_string)===false) { echo("Yeah, right!"); exit; }
You'll have a lot of problems, though, because 1. You also need to check for <script type="text/javascript">; 2. You have to strtolower() both strings in order to eliminate capitalization differences; 3. and the tougher: how do you check for this one: "<script language ='javascript' \t>", where "\t" is a tab character? And obviously all the possible combinations... Bogdan Ash wrote: > Hi i've taken a look throught he manual and i can't find a function to do > this > > Basically i want to take in a string and check that the string doesn't > contain a certain word or something > > ie check that it doesn't contain <SCRIPT LANGUAGE = Javascript> to prevent > hackers/crackers on my guestbook > > Thanks > > Ash > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]