Skip to content

Instantly share code, notes, and snippets.

Created June 28, 2011 23:02
Show Gist options
  • Save anonymous/1052466 to your computer and use it in GitHub Desktop.
Save anonymous/1052466 to your computer and use it in GitHub Desktop.
<?php
error_reporting(E_ERROR);
$html = file_get_contents("http://finance.yahoo.com/futures?t=energy");
$dom = new DOMDocument();
$dom->recover = true;
$dom->strictErrorChecking = false;
$dom->loadHTML($html);
$table = $dom->getElementsByTagName('table');
echo "Table: <br/>";
print_r($table);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment