true, CURLOPT_HTTPHEADER => ['Authorization: OAuth ' . $token], CURLOPT_TIMEOUT => 10, ]); $res = curl_exec($ch); $http = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); // Returnér resultat som JSON header('Content-Type: application/json'); echo json_encode( [ 'http' => $http, 'data' => json_decode($res, true), ], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE );