[thelist] a PHP function question - solved

Bob Meetin ontheroad at frii.com
Mon Feb 12 11:05:52 CST 2007

function censor ($data)
	global $pass;
	if (eregi('gambl', $data)) { $message = "inappropriate content - submission denied"; $pass = "NO"; }
	$data = str_replace("gambl", "", $data);
	$data = str_replace("gambling", "", $data);
     	return $data;

The original problem was solved.  I can also add a str_replace to convert questionable content to something acceptable. Could be a long list. 

Here's another twist, I see lots of attempted submissions where the spammer copies a dozen or so spam links into a message, usually 


Here we're dealing with unknown words but a repetitive situation.  I'm thinking about setting up an incremental counter based upon how many times http://www has been added to the page and once it meets a very modest threshhold, passing the $pass = "NO" variable.  

Any thoughts on how to make this work, function as a loop?


More information about the thelist mailing list