Created
February 8, 2012 17:13
-
-
Save stevepm/1771209 to your computer and use it in GitHub Desktop.
scrape
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
test