douyong2531 2015-05-20 08:04
浏览 109
已采纳

电影预告片Api结果id html没有响应输出

http://trailerapi.com/api/api.php?user_trailer_limit=10&language=en link

$api_url_content='http://trailerapi.com/api/api.php?user_trailer_limit=10&language=en'; 
if(!$xml = simplexml_load_file($api_url_content))
{
echo “Error”;
}else
{

foreach( $xml as $film ) {
$movie_name= $film->name,
$movie_poster =$film->poster;
$movie_id=> $film->did;
$movie_description=$film->description;
$movie_year=$film->year;
$movie_producer=>$film->producer;
$movie_imdb=$film->imdb;
$movie_cast=$film->cast;
$movie_genre=$film->genre;
$movie_trailer='<iframe src=”http://www.dailymotion.com/embed/video    /’.$film->did.'” width=”720″ height=”480″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>';

INSERT INTO `trailer`.`trailers` (`id`, `name`, `description`, `poster`, `cast`,`embed`) 
 VALUES (NULL, '{$movie_name}', '{$movie_description}', 
'{$movie_poster}', '{$movie_cast}', '{$film->did}');
}

}

<?php $query=mysql_query("SELECT * FROM trailer Where id='{$_GET['id']}' Limit 1");
$fetch=mysql_fetch_array($query); ?>
<div style="width:100%">
<iframe src=”http://www.dailymotion.com/embed/video/<?php echo $embed; ?>” frameborder=”0″ 
allowfullscreen=”allowfullscreen”></iframe>
</div>

html code div responsive and player is not Responsive

How to Responsive Embed Code

output :

<div style="width:100%">
<iframe src=”http://www.dailymotion.com/embed/video/ x2pgbqt” frameborder=”0″ 
allowfullscreen=”allowfullscreen”></iframe>
</div>
  • 写回答

1条回答 默认 最新

  • duanfei8149 2015-05-20 20:34
    关注

    Your code should be like that

    <iframe src="http://www.dailymotion.com/embed/video/x2pgbqt" frameborder=”0″ 
    allowfullscreen="allowfullscreen" width="100%"></iframe>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 CSS实现渐隐虚线边框
  • ¥15 thinkphp6配合social login单点登录问题
  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题