Pitchfork 'Best New Albums' Torrent Search

Pitchfork_Best_new_Music_BTJunkie_Search

Ok so this might be slightly illegal, but I am really just generating some links.

I wrote some code that will take the RSS feed from this page: http://pitchfork.com/reviews/best/albums/ and searches BTJunkie for torrents.

Here it is in action:
http://danfolkes.com/pitchfork_torrent_albums_best/

Here is the source: (also here)

";
  $doc = new DOMDocument();
  $doc->load('http://feeds2.feedburner.com/PitchforkBestNewAlbums');

  foreach ($doc->getElementsByTagName('item') as $node) {
	echo "";
	$title = $node->getElementsByTagName('title')->item(0)->nodeValue;
	echo $title;
    $doc2 = new DOMDocument();
 	$doc2->load("http://btjunkie.org/rss.xml?query=".urlencode($title));
	echo "";
	foreach ($doc2->getElementsByTagName('item') as $node2) {
		echo "";
		$link = "item(0)->nodeValue."' target='_blank'>";
		$link.= $node2->getElementsByTagName('title')->item(0)->nodeValue."";
		echo $link;
		echo "";
	}

  }
  //print_r($arrFeeds);
  echo "";

?>