IDrive - EVS - REST API - downloadFile
$uid = "[your IDrive user ID]";
$pwd = "[your IDrive user password]";
$crtpath = "[a path to your local cert]";
$pvtkey = "[your private key]";
$p = "[path in your account where file will be upload]";
$version = "[the version number of the file that you wish to download]";
$thumbnail_type = "[S OR I]";
$trash = "[set trash parameter to yes to download files from trash]";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->data['weburl'].'/evs/downloadFile');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
$body = 'uid=' . $uid. '&pwd=' . $pwd.'&p='. $p . '&pvtkey=' . $pvtkey . '&version='. $version .'&thumbnail_type=' . $thumbnail_type . '&trash='. $trash;
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('multipart/form-data'));
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($ch,CURLOPT_CAINFO,$crtpath);
$output = curl_exec($ch);
curl_close($ch);