Hello, I am trying to download a file with PHP, but I am having trouble with this part of the code. I need an example in this regard
$url = "https://content.dropboxapi.com/2/files/download";
$sAccessToken = "*************************";
$curl = curl_init($url);
$aPostData = array('path' => '/test.rar');
$aOptions = array(
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => array('Content-Type:',
'Authorization: Bearer ' . $sAccessToken,
'Dropbox-API-Arg: ' . json_encode($aPostData)
) ,
CURLOPT_RETURNTRANSFER => true
);
curl_setopt_array($curl, $aOptions);
$result = curl_exec($curl);
echo $result;