'ok']); } else { http_response_code(500); echo json_encode(['status' => 'error']); } } else { header('HTTP/1.0 401 Unauthorized'); exit(); }