Web サイト 1 でこの設定を行っている場合:
<div class="awesomeContent">
<div>
Information goes here...
</div>
<div>
Information goes here...
</div>
<div>
Information goes here...
</div>
</div>
次に、これをWebサイト2で使用する場合:
<?php
$data = file_get_contents('http://website.com/hello);
preg_match_all ("/<div class=\"awesomeContent\">([^`]*?)<\/div>/", $data, $matches);
print_r($matches[0]);
投稿したい:
<div class="awesomeContent">
<div>
Information goes here...
</div>
<div>
Information goes here...
</div>
<div>
Information goes here...
</div>
</div>
しかし、私が得るのは
<div class="awesomeContent">
<div>
Information goes here...
</div>
どうすればこれを改善できますか?