PC Nerd Posted March 1, 2007 Share Posted March 1, 2007 hi guys i know you dont want to just debug scripts, but i cant find the error in this script: <?php require("inc_files/Database_link.inc"); require("inc_files/Page_Data.inc"); #function sensor_words($Body) { #$Sensor_Words = array("###", "###", "###"); #$Sensor_Char = array("!", "@", "#", "$", "%", "^", "&", "*"); #$Words = explode($Body, " "); #$Periods = explode($Body, "."); #foreach($Periods as $Key => $Period_Word) { # if($Period_Word != ".") { # $Period_Place[] = $Period_Word; # } #} #$Period_Index = 0; #foreach($Words as $Word) { #20 #foreach($Sensor_Words as $Sensor_Word) { #if($Word == $Sensor_Word) { #$Word_len = strlen($Word); #while($Word_Len != 0) { # $Sensord_Word = $Sensord_Word.rand($Sensor_Char); # $Word_Len --; #} #if($Word == $Period[$Period_Index]){ # $Sensord_Message = $Sensord_Message."."; # $Period_Index = $Period_Index + 2; #} #$Sensord_Word = "#$%^"; #$New_Message[] = $Sensord_Word; #} #else { # $New_Message[] = $Word; #} #} #if($Word == $Period[$Period_Index]){ # $Word = $Sensord_Message."."; #40 #} #$New_Message[] = $Word; #} #$New_Message = implode( " ", $New_Message); #echo $New_Message; #$New_Message = str_replace("###", "#$%^", $Body); #} #if(isset($_POST['Message_Body'])) { # $Body = $_POST['Message_Body']; # $New_Message_Out = sensor_words($Body); #} #60 function sensor_words() { $New_Message = $_POST['Message_Body']; $Sensor_list = array("####"); $Sensor_Char_list("!", "@", "#", '$", "%", "^", "&", "*"); $Sensor_Char_Replace = rand($Sensor_Char_list).rand($Sensor_Char_list).rand($Sensor_Char_list).rand($Sensor_Char_list); foreach($Sensor_list as $Sensor_Word) { $New_Message = str_replace($Sensor_Word, $Sensor_Char_Replace, $New_Message); } } #77 ?> <html> ...... html stuff here php code in the body of the page: <?php #120 #$New_Message = sensor_words(); echo "<br><br><br>\n"; echo $New_Message; ?> the error is "Parse error: parse error, unexpected $end in Message_Handler.php on line 142 thanks ps. i know that the way im filtering may not be the best way to do this, but im just starting.thanks Quote Link to comment Share on other sites More sharing options...
itsmeArry Posted March 1, 2007 Share Posted March 1, 2007 here is the error $Sensor_Char_list("!", "@", "#", '$", "%", "^", "&", "*"); replace it with $Sensor_Char_list("!", "@", "#", "$", "%", "^", "&", "*"); Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted March 1, 2007 Author Share Posted March 1, 2007 both of those are the same ????, whats the problem, can you explain it please Quote Link to comment Share on other sites More sharing options...
effigy Posted March 1, 2007 Share Posted March 1, 2007 Your quotes don't match: '$" Quote Link to comment Share on other sites More sharing options...
itsmeArry Posted March 2, 2007 Share Posted March 2, 2007 i have replaced '$" to "$" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.