File size: 957B
<?php
include'func.php';
$title='Loved Track';
include'head.php';
echo'<div class="phdr">Loved Track</div>';
if(!empty($_GET['page'])){
$noPage=$_GET['page'];
}else{
$noPage='1';
}
$json=json_decode(ngegrab('http://ws.audioscrobbler.com/2.0/?method=chart.getlovedtracks&api_key=7df2ba528dcd0d495e3db6284ee6e1a3&format=json&limit=10&page='.$noPage.''));
if (!empty($json)){
foreach($json->tracks->track as $list){
$name=$list->name;
$artist=$list->artist->name;
echo'<div class="list"><a href="/?q='.$artist.'+'.$name.'" title="Download Mp3 '.$artist.' - '.$name.'">'.$artist.' - '.$name.'</a></div>';}
echo '<div class="rmenu" align="center">';
if ($noPage > 1) {echo'<a href="?page='.($noPage-1).'">« Previous</a> - ';}
if ($noPage <= 100) {echo'<a href="?page='.($noPage+1).'">Next Page »</a> ';}
echo '</div>';
}else{echo'<div class="news"><font color="red">Result Not Found, please use another keyword.</font></div>';}
include'foot.php';
?>