Re: Needle in a haystack
Posted: Fri Mar 18, 2011 1:25 pm
Ok I figured it out.
Some of the words that I am searching for include "frame" "iframe" etc,. Since the 'replaced' array's index was given this value it was causing the items to be drawn when I dumped the variable. So I replaced the index naming with numbers which I can easily check to find the data.
To back track a little what I am trying to do is scan input for malicious code injection. Lumped in with the malicious words are some abusive words, if a malicious word was found I send an email alert. If an abusive/sewar word is found there is no need to send an email alert. What I needed was a way to differentiate between the two.
To solve the rpoblem I actually took a few steps back. I now run str_replace twice - once checking for malicious words, then a second time looking for abusive/swear words. This way I don't have to make the differentiation.
Thanks for your help guys.
Rob.
Some of the words that I am searching for include "frame" "iframe" etc,. Since the 'replaced' array's index was given this value it was causing the items to be drawn when I dumped the variable. So I replaced the index naming with numbers which I can easily check to find the data.
To back track a little what I am trying to do is scan input for malicious code injection. Lumped in with the malicious words are some abusive words, if a malicious word was found I send an email alert. If an abusive/sewar word is found there is no need to send an email alert. What I needed was a way to differentiate between the two.
To solve the rpoblem I actually took a few steps back. I now run str_replace twice - once checking for malicious words, then a second time looking for abusive/swear words. This way I don't have to make the differentiation.
Thanks for your help guys.
Rob.