define(LAST_FM_API, ''); //your last.fm API key, get from **********
<?PHP function objectsIntoArray($arrObjData, $arrSkipIndices = array()) { $arrData = array(); // if input is object, convert into array if (is_object($arrObjData)) { $arrObjData = get_object_vars($arrObjData); } if (is_array($arrObjData)) { foreach ($arrObjData as $index => $value) { if (is_object($value) || is_array($value)) { $value = objectsIntoArray($value, $arrSkipIndices); // recursive call } if (in_array($index, $arrSkipIndices)) { continue; } $arrData[$index] = $value; } } return $arrData; } error_reporting(0); $Artist = urlencode("Negura Bunget"); $Album = urlencode("Om"); $xmlUrl = "http://ws.audioscrobbler.com/2.0/?method=album.getinfo&artist=$Artist&album=$Album&api_key=b25b959554ed76058ac220b7b2e0a026"; $xmlStr = file_get_contents($xmlUrl); $xmlObj = simplexml_load_string($xmlStr); $arrXml = objectsIntoArray($xmlObj); if($arrXml['@attributes']['status'] =='ok'){ echo "<img src=\"".$arrXml['album']['image'][2]."\" >";} ?>
<?PHP function objectsIntoArray($arrObjData, $arrSkipIndices = array()) { $arrData = array(); // if input is object, convert into array if (is_object($arrObjData)) { $arrObjData = get_object_vars($arrObjData); } if (is_array($arrObjData)) { foreach ($arrObjData as $index => $value) { if (is_object($value) || is_array($value)) { $value = objectsIntoArray($value, $arrSkipIndices); // recursive call } if (in_array($index, $arrSkipIndices)) { continue; } $arrData[$index] = $value; } } return $arrData; } error_reporting(0); $artistfromfile = file_get_contents ( 'http://api.nnradio.tk/artist.txt' ); $albumfromfile = file_get_contents ( 'http://api.nnradio.tk/album.txt' ); $Artist = urlencode($artistfromfile); $Album = urlencode($albumfromfile); $xmlUrl = "http://ws.audioscrobbler.com/2.0/?method=album.getinfo&artist=$Artist&album=$Album&api_key=b25b959554ed76058ac220b7b2e0a026"; $xmlStr = file_get_contents($xmlUrl); $xmlObj = simplexml_load_string($xmlStr); $arrXml = objectsIntoArray($xmlObj); if($arrXml['@attributes']['status'] =='ok'){ echo "<img src=\"".$arrXml['album']['image'][2]."\" >";} ?>
$song.album$
$song.artist$
<?php $Artist = "$song.artist$"; $Album = "$song.artist$"; ?>
<!--include("_config.html")--> <?PHP $songtitle = "$song.combine$"; $songtime = "$song.mmss$"; $queue = "<!--LOOP(queue,2)-->$queue.artist$ <!--LOOP_END-->"; $listeners = "$Viewers$"; $pic = "$picture_dir$$song.picture$"; ?>