syntax error.. hvad gør jeg?
Hey eksperter!Jeg har lavet en php kode, hvor jeg gerne vil indsætte nogle embed videoer i, og så rammer jeg ind i denne fejl:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/www/fb.spirmedia.dk/hunden.php on line 25
- Koden ser sådan her ud:
<? require 'facebook.php';
$app_id = "xxxxxxxxxxx";
$app_secret = "xxxxxxxxxxxxxxxxxxx";
$facebook = new Facebook(array(
'appId' => $app_id,
'secret' => $app_secret,
'cookie' => true
));
$signed_request = $facebook->getSignedRequest();
function parsePageSignedRequest() {
if (isset($_REQUEST['signed_request'])) {
$encoded_sig = null;
$payload = null;
list($encoded_sig, $payload) = explode('.', $_REQUEST['signed_request'], 2);
$sig = base64_decode(strtr($encoded_sig, '-_', '+/'));
$data = json_decode(base64_decode(strtr($payload, '-_', '+/'), true));
return $data;
}
return false;
}
if($signed_request = parsePageSignedRequest()) {
if($signed_request->page->liked) {
echo "<img src=\"hunden.jpg\">
<p><h3>Kender du de her videoer?</h3></p>
<p><script type="text/javascript" src=\"http://videos.video-loader.com/playerjs/sport_8211.js?w=400&h=350&pID=50581&bgc=ffffff&cw=842751&skinName=light&wmode=window&hideChrome=0\"></script>
</p>
<p><script type="text/javascript" src=\"http://videos.video-loader.com/playerjs/kia_picanto_8327.js?w=400&h=350&pID=50581&bgc=ffffff&cw=842753&skinName=light&wmode=window&hideChrome=0\"></script>
</p>
<p>
<script type="text/javascript" src=\"http://videos.video-loader.com/playerjs/skjult_kamera_8395.js?w=400&h=350&pID=50581&bgc=ffffff&cw=842755&skinName=light&wmode=window&hideChrome=0\"></script>
</p> ";
} else {
echo "<h3>Tryk synes godt om, for at se hunden!:)</h3>";
}
}
?>
Hvad gør jeg forkert?