Advertisement
Guest User

itunes

a guest
Nov 18th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. $itunes = json_decode(get("https://itunes.apple.com/us/rss/topsongs/limit=100/json"),true);
  2. if($itunes[feed][entry]) {
  3.  
  4.     foreach ($itunes[feed][entry] as $itune) {
  5.         $title = $itune[title][label];
  6.         $artist = $itune['im:artist'][label];
  7.         $image = $itune['im:image'][0];
  8.         $image = $image[label];
  9.  
  10.         echo "<div class='file'><table width='100%' cellspacing='0px'><tbody><tr valign='middle'><td width='5%' align='center'>
  11. <img class='thumb' src='$image' alt='$title' width='60px' height='45px'/></td><td width='50%'><h4>$title .mp3</h4><h5>Artist : $artist </h5><a href='/track/".links($title).".html' title='$title' class='f'><strong>+ Download MP3</strong></a></td></tr></table></div>";     
  12.     }
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement