PDA

View Full Version : Blocking Form Spam



kruser
03-26-2009, 01:10 PM
Hello,

I have a form that someone is passing undesirable content with. I have tried to remove the "[ ]" brackets using php string replace , but the bad content & brackets are still getting passed.

This is a piece of what is being passed.

yreltceurbjf (http://yreltceurbjf.com/)

Does anyone know how to handle this?

nayes84
04-17-2009, 10:05 AM
It seem there is a problem with your replace code. can you post it here to check it for you.
you can also use regular expressions to strict inputs to certain pattern. like numbers or letters only or both.

wige
04-17-2009, 11:53 AM
brackets should be able to be removed using:

$string = ereg_replace('[\[\]]', '', $string);