ostapdontstop

phphp

Jun 26th, 2021
892
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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());
RAW Paste Data