ak47suk1

jerebu

Jun 22nd, 2013
76
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3.  
  4. $html = file_get_contents("http://www.doe.gov.my/apims/index.php");
  5.  
  6. // a new dom object
  7. $dom = new domDocument;
  8.  
  9. // load the html into the object
  10. $dom->loadHTML($html);
  11.  
  12. // discard white space
  13. $dom->preserveWhiteSpace = false;
  14.  
  15. $tables = $dom->getElementsByTagName('table');
  16.  
  17. foreach($tables as $table)
  18. {
  19.     echo $dom->saveHTML($table);
  20. }
  21.  
  22. ?>
RAW Paste Data