这是我的第一篇文章。我不是专家,我试图获取源代码html代码,但呈现...因为我们使用浏览器中的“ispect element”选项。获取提供的html代码
我试过的代码波纹管,但它返回的源代码(无渲染):
<?php
require_once ('url_to_absolute/simple_html_dom.php');
$masterurl = "http://www.myexamplesite.com/?p=154";
$html = new simple_html_dom();
$html->load_file($masterurl);
$items = $html->find('article',0)->outertext;
echo $items;
?>
如果源链接已拥有YouTube的iframe我的代码,并再次返回不能作为一个iframe的渲染..
有什么办法可以用php来完成这个任务吗?
感谢大家
内 Php ?> ?????? – devpro
[PHP代码未被执行(我可以在页面的源代码中看到它)]的可能重复](http://stackoverflow.com/questions/5121495/php-code-is-not-being-executedi-i-可以看到它的源代码页面) – Federkun
例如你的网站是example.com ..你想得到整个源代码?使用脚本? –