I have this result from curl the API:
{
	"success": true,
	"results": {
		"id": "1d781c570ff2fc71047b225de95bac4a",
		"drive_id": "abcxyz"
	}
}
Since the player need the result from API to be in this format:
{
	"success": true,
	"results": {
		"file": "https://api.domain.com/1d781c570ff2fc71047b225de95bac4a.m3u8",
		"drive_id": "abcxyz"
	}
}
so I have this after curl function
if($results->success) {
    $dr_id = $results->results->id;
    $m3u8 = 'https://api.domain.com/'+$dr_id+'.m3u8';
    return $m3u8;
} else {
   return 'Error';
I know this is wrong but I don’t know how to change the api result to the correct format.