Skip to content

Instantly share code, notes, and snippets.

@stevepm
Created February 8, 2012 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevepm/1771209 to your computer and use it in GitHub Desktop.
Save stevepm/1771209 to your computer and use it in GitHub Desktop.
scrape
<?php
error_reporting(E_ERROR | E_PARSE);
$dom = new DOMDocument();
$dom->loadHTMLFile('http://www.xbox360achievements.org/games/retail/');
$xml = simplexml_import_dom($dom);
$links = $xml->xpath('//table/tr/td/a');
for($i=30;$i<count($links);$i++):
?>
<a target="_blank" href="http://www.xbox360achievements.org/games/retail/<?php echo $links[$i]['href']; ?>"><?php echo $links[$i]['href']; ?></a><br/>
<?php
endfor;
?>
@saverdaj
Copy link

saverdaj commented Feb 9, 2012

test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment