Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 10th, 2010 | Syntax: None | Size: 1.00 KB | Hits: 30 | Expires: Never
Copy text to clipboard
  1. $fetch = file_get_contents("http://www.dizzler.com/index.search.dv8?f=1&q=".urlencode($_GET['search'])."&pg=".$_GET['page']);
  2.  
  3. $totalsongs = trim(explodegasm("Found <i>","</i> songs for",$fetch,1)); // TOTAL amount of songs found
  4. $resultlimit = explodegasm("content=\"Found "," songs matching ", $fetch,1); //Single out the amount of results which will be shown on a particular page
  5. $filtered = str_replace("{", ",", explodegasm("var songnames = ","};",$fetch,1)); //Filter $fetch for the songs and ID's
  6.  
  7. while ( $i <= $resultlimit )
  8. {
  9.         $name = "!".explodegasm(":\"","\"",$filtered,$i);
  10.     $artist = explodegasm("!"," - ",$name,1);
  11.     $name = str_replace(array($artist," - ","!","&"),array("","","","and"),$name);
  12.     if($artist == ""){ $artist = "Unknown"; }
  13.     $id = str_replace(array("\"", ","), "", explodegasm(",\"","\":",$filtered,$i));
  14.    
  15.     if($name != ""){
  16.         echo '<song><id>' . $id . '</id><title>' . $name . '</title><artist>' . $artist . '</artist></song>';
  17.     }
  18.    
  19.     ++$i;
  20. }