Mensur Mensur - 1 year ago 72
PHP Question

Get song information from soundcloud, having song id

I'm having song id's stored from Soundcloud but I would like to fetch information from Soundcloud from these songid:s.

How do I get the song name, artist, cover from artists using PHP?

Anyone having any examples maybe? All help would be appriciated.

Answer Source

To get song information from SoundCloud sending a GET request to their API should work fine.


$ curl "{track_id}?client_id={YOUR_CLIENT_ID}"



// Get cURL resource
$curl = curl_init();

// Set some options
curl_setopt_array($curl, array(
    CURLOPT_URL => '{track_id}?client_id={YOUR_CLIENT_ID}'

// Send the request & save response to $resp
$resp = curl_exec($curl);

// Close request to clear up some resources


API reference -

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download