Skip to content

Instantly share code, notes, and snippets.

@mikevalstar
Forked from anonymous/gist:1052466
Created June 28, 2011 23:13
Show Gist options
  • Save mikevalstar/1052479 to your computer and use it in GitHub Desktop.
Save mikevalstar/1052479 to your computer and use it in GitHub Desktop.
<?php
$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);
for($x = 0; $x < $table->length; $x++)
echo "we have a table";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment