Help with api Error Parse error: syntax error, unexpected

0

<?php

$service_url = 'http://coversat.localize.cc/api/statuses';

$curl = curl_init($service_url);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

$headers = ['X-Client-Id: XXXXXXX',

    'X-Client-Secret: XXXXXX',

    'Content-Type: application/json; charset=utf-8'

];



curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);



$curl_response = curl_exec($curl);

curl_close($curl);



if ($curl_response === false) {

    $info = curl_getinfo($curl);

    curl_close($curl);

    die('error occured during curl exec. Additioanl info: ' . var_export($info));

} else {

  $decoded = json_decode($curl_response);

 

 



  

}



?>
    
asked by anonymous 16.05.2017 / 15:04

0 answers