function getJsonSongs($idd) { $songsobj = getSongsById($idd, "Obj"); if ($songsobj == '') { echo '<p align="center">The mp3 donot exist</p>'; die; } $result = array("mp3URL" => urlencode(str_ireplace('http://m', 'http://p', $songsobj->mp3Url)), "img" => urlencode($songsobj->album->blurPicUrl), "Artist" => $songsobj->artists[0]->name, "Album" => $songsobj->album->name, "Name" => $songsobj->name); return $result; }
<?php include "header.php"; ?> <?php include "api/function.php"; $idd = $_GET['id']; if ($idd == '') { $idd = '28563201'; } $songsobj = getSongsById($idd, "Obj"); if ($songsobj == '') { echo '<p align="center">The mp3 donot exist</p>'; } else { echo '<p align="center"><a href="' . getJsonUrlById($idd, "Songs") . '">JsonUrl</a></p>'; } $mp3Url = new stdClass(); $mp3Url->l = $songsobj->mp3Url; $mp3Url->m = getSongURL($songsobj, 'm'); $mp3Url->h = getSongURL($songsobj, 'h'); ?> <div class="container"> <div class="row"> <div class="col s12 m6"> <div class="card"> <div class="card-image"> <img class="responsive-img" src="<?php