這是我的第一篇文章。我不是專家,我試圖獲取源代碼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 ..你想得到整個源代碼?使用腳本? –