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