Jump to content

[SOLVED] unexpected T_VARIABLE


jnerotrix

Recommended Posts

I get This Error

 

Parse error: syntax error, unexpected T_VARIABLE in /www/rack111.com/m/y/t/mytestsite/htdocs/youtube/index.php on line 14

 

In This Code

<title> Up Your Video Views </title>

<?php

if ($_POST['action'] == 'Submit') {
   
$numTimes = (isset($_POST['times']) && is_numeric($_POST['times']))?$_POST['times']:10;
$shorturl = $_POST['url'];
$autoplay = "&autoplay=1";
$reloadtime = $_POST['reloadtime'];
$setwidth = $_POST['setwidth'];
$setheight = $_POST['setheight'];
$fullurl = "http://www.youtube.com/watch?v=$shorturl"
$shorturl = $_POST['url'];
$fullurl = "http://www.youtube.com/watch?v=$shorturl"

function check_if_valid($fullurl) {
$res = (($check = @fopen($fullurl, ‘r’)) === false) ? false : @fclose($check);
return ($res == TRUE) ? VIDEO_IS_VALID:VIDEO_IS_INVALID ;
}


echo '<meta http-equiv="refresh" content="$reloadtime">';

for ($i=0; $i < $numTimes; $i++) {
echo '<object width="$setwidth" height="$setheight""><param name="movie" value="http://www.youtube.com/v/$shorturl&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/$shorturl&hl=en&fs=1$autoplay" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="false" width="$setwidth" height="$setheight"></embed></object>';
}

}

?>

<table border="1">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<tr>
<td>Video Url:<input type="text" readonly="1" value="http://www.youtube.com/watch?v="><input type="Text" name="url"></td>
</tr>
<tr>
<td>(Number)<input type="text" name="times" value="10"> of Times to Display Video in <input type="text" name="reloadtime" value="5">(Seconds)</td>
</tr>
<tr>
<td>Set Width <input type="text" name="setwidth" value="425"></td>
<td>Set Height <input type="text" name="setheight" value="344"></td>
</tr>
<tr>
<td align="center" valign="center"><input type="submit" name="action" value="Submit"></td>
</tr>
</form
</table>




 

Link to comment
https://forums.phpfreaks.com/topic/135586-solved-unexpected-t_variable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.