Php Iframe不显示某些页面
在iFrame中显示某些网站时出现问题。 这个有效Php Iframe不显示某些页面,php,html,iframe,Php,Html,Iframe,在iFrame中显示某些网站时出现问题。 这个有效 <article class='nobackground'> <iframe src='http://en.wikipedia.org/wiki/<?php echo $myid ?>'></iframe> </article> 你不能iframe Google或其他网站,因为它们的X-Frame选项是通过标题发送的。您的浏览器尊重这一点,并拒绝显示您试图链接的页面
<article class='nobackground'>
<iframe src='http://en.wikipedia.org/wiki/<?php echo $myid ?>'></iframe>
</article>
你不能iframe Google或其他网站,因为它们的X-Frame选项是通过标题发送的。您的浏览器尊重这一点,并拒绝显示您试图链接的页面 谷歌和其他许多公司禁止通过Javascript(使用top.location检测当前帧)和Grzegorz Grzybek提到的X-Frame-Option标题(禁止兼容浏览器的帧)对内容进行iframing
如果您想捕获内容,您必须编写一个变通页面,执行file\u get\u content()或cURL调用,以获取页面代码并稍微修改代码(将URL设置为绝对URL,删除不需要的脚本),然后将代码回显到本地页面上。有关X-Frame-Option HeadererRem的解释,请参阅。。。你为什么要做
?“这里没什么可看的,走吧……”
<article class='nobackground'>
<iframe src='http://www.google.ie/search?tbm=isch&hl=en&source=hp&biw=1280&bih=679&q=<?php echo $myid ?>'></iframe>
</article>
iframe {
width: 100%;
height: 620px;
background: white;
border: 1px solid rgb(192, 192, 192);
margin: -1px;
}
article.fill iframe {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border: 0;
margin: 0;
border-radius: 10px;
-o-border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
z-index: -1;
}