'full', 'user_id' => '1', 'key' => $matches[1][0], 'in_order' => 'true'); $options = array( 'http' => array( 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($data), ), ); $context = stream_context_create($options); $result = json_decode(file_get_contents($url, false, $context), true); $songinfo = $result[3]["sched_current"]["song_data"][0]; $artists = array(); foreach($songinfo["artists"] as $item) { $artists[] = $item["artist_name"]; } print sprintf("%s - %s (from %s) %s", implode(", ", $artists), $songinfo["song_title"], $songinfo["album_name"], $songinfo["song_url"]);