Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $html = file_get_contents('https://dx.doi.org/10.1111/gcb.14883');
- // echo $html;
- $doc = new DOMDocument;
- // set error level
- $internalErrors = libxml_use_internal_errors(true);
- $doc->loadHTML($html);
- $item = $doc->getElementById('dragon');
- echo $item->textContent;
- echo html_entity_decode($doc->saveHTML());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement