指定された URL からテキスト コンテンツを解析しようとしています。コードは次のとおりです。
<?php
$url = 'http://stackoverflow.com/questions/12097352/how-can-i-parse-dynamic-content-from-a-web-page';
$content = file_get_contents($url);
echo $content; // This parse everything on the page, including image + everything
$text=escapeshellarg(strip_tags($content));
echo "</br>";
echo $text; // This gives source code also, not only the text content over page
?>
ページの上に書かれたテキストだけを取得したい。ページのソース コードはありません。これについて何か考えはありますか?私はすでにグーグルで検索しましたが、上記の方法はどこにでもしか存在しません。