phpで他のページの一部を利用する

<?php
function ripping_html($source){
$start = '<!-- Next Study start -->';
$end = '<!-- Next Study end -->';

$html_source = file_get_contents("$source");
$rip_source = preg_replace('/\n/', ' ', $html_source);
$pattern= "/$start(.*)$end/";
preg_match($pattern, $rip_source, $match);
echo $match[0];
}
//example
//ripping_html('../../research/publiclaw/index00.html');
?>

こんな感じで、該当ページのスタートからエンドまでを抜いてきてくれる。

アーカイブ

ウェブページ

「紺屋の白袴」とはまさにこの事。見にくいしスマホ対応もまだしていません。そのうちやります。そのうちにね。

エフスタジオの中の人は株式会社メキメキに在籍しています。