Better method than stristr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can someone please advise a faster solution to do what I'm doing below? All I need to be able to do is determine if any of the strings in the array are contained in $q. The method I have works, but I'm sure its not the most efficient way to do it.

$dirtyWord = array("UNION","LOAD_FILE","LOAD DATA INFILE","LOAD FILE","BENCHMARK","INTO OUTFILE");
		foreach($dirtyWord as $injection)
		{
			if(stristr($q,$injection))
			{
				//Do Something to remove injection and log it
			}
		}

		
Thank you.
--Steven



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux