Jump to content

[SOLVED] cannot find error, unexpected end


PC Nerd

Recommended Posts

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.