Quantcast
Channel: The Echo Nest Developer Forum
Viewing all articles
Browse latest Browse all 1582

Get analyzer info from not known song

$
0
0

Almost there. Got an "unknown error":

array(1) { ["response"]=> array(1) { ["status"]=> array(3) { ["version"]=> string(3) "4.2" ["code"]=> int(-1) ["message"]=> string(13) "Unknown Error" } } }

This works fine: http://developer.echonest.com/api/v4/track/profile?api_key=mykey&format=json&id=TRFDRQO140E432F7DB

But the php query seems off:

$id = TRFDRQO140E432F7DB;
   $post = array(
     "id"=>$id,
     "api_key"=>"myapi",
     "format"=>"json"
    //      "wait"=>"true"
    //      "bucket"=>"audio_summary",
    //      
    );
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_URL, "http://developer.echonest.com/api/v4/track/profile");
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post); 
    $response = curl_exec($ch);

    $result=json_decode($response,true);
     var_dump($result);

Am I missing a sillly thing in this code?

ps: _ is an underscore, it didn't come through well.


Viewing all articles
Browse latest Browse all 1582

Trending Articles