<html>
<?php
$url = "http://www.youtube.com/embed/FTGNAupPqpU";
$str = "title of video here";
$css = <<<EOT
<style type="text/css">
body
{
background: #eeeeee;
width:560px;
height:315px;
}
</style>
EOT;
$data = file_get_contents($url);
$data = str_replace('</body>', $css.'</body>', $data);
echo '<div style="overflow:scroll;">'.$data.'</div>';
echo $str
?>
</html>
変数が格納されている場合$url
(主に YouTube ビデオ) はまったくエコーしませんが、何もエコーしない$str
場合は理由がわかりません。動画を上部に表示して、動画のタイトルとして使用したいと考えています。$url
$str
$str