Advertisement
ostapdontstop

phphp

Jun 26th, 2021
1,181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. <?php
  2. $html = file_get_contents('https://dx.doi.org/10.1111/gcb.14883');
  3. // echo $html;
  4.  
  5. $doc = new DOMDocument;
  6.  
  7. // set error level
  8. $internalErrors = libxml_use_internal_errors(true);
  9. $doc->loadHTML($html);
  10. $item = $doc->getElementById('dragon');
  11. echo $item->textContent;
  12. echo html_entity_decode($doc->saveHTML());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement