- json_decode: documentation ( source)
<?php
$spotify1="https://itunes.apple.com/search?term=";
$spotify2=" - ";
$spotify3="&limit=1";
$spotify_url = "https://itunes.apple.com/search?term=Kylie+Minogue";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$spotify_url);
$spotify = curl_exec($ch);
curl_close($ch);
$obj = json_decode($spotify);
//$total = $obj->resultCount->results;
//$img640_url = $obj->resultCount[0]->results[1]->artworkUrl100;
echo $img640_url;