IDrive - EVS - REST API - deleteFile
$uid = "[your IDrive user ID]";
$pwd = "[your IDrive user password]";
$crtpath = "[a path to your local cert]";
$pvtkey = "[your private key]";
$p = "[resource (folder) path]";
$trash = "[et trash parameter to yes to delete files permanently from trash]";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->data['weburl'].'/evs/deleteFile');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
if($pvtkey == ''){
$body = 'uid=' . $uid. '&pwd=' . $pwd.'&p=' . $p . '&trash=' . $trash;
}else{
$body = 'uid=' . $uid. '&pwd=' . $pwd.'&p='. $p . '&trash=' . $trash . '&pvtkey=' . $pvtkey;
}
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded; charset=UTF-8'));
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($ch,CURLOPT_CAINFO,$crtpath);
$output = curl_exec($ch);
curl_close($ch);