9cd8aa27b9211ce4c33db7f1daa868f56e1e183b.svn-base 361 B

123456789101112131415161718
  1. <?php
  2. // example of how to modify HTML contents
  3. include('../simple_html_dom.php');
  4. // get DOM from URL or file
  5. $html = file_get_html('http://www.google.com/');
  6. // remove all image
  7. foreach($html->find('img') as $e)
  8. $e->outertext = '';
  9. // replace all input
  10. foreach($html->find('input') as $e)
  11. $e->outertext = '[INPUT]';
  12. // dump contents
  13. echo $html;
  14. ?>