kinlane
4/13/2012 - 5:37 AM

IDrive - EVS - REST API - searchFiles

IDrive - EVS - REST API - searchFiles

$uid = "[your IDrive user ID]";	
$pwd = "[your IDrive user password]";
$crtpath = "[a path to your local cert]";

$p = "[path in your account where file will be upload]";
$searchKey = "[search term]";
$trash = "[set trash parameter to yes to download files from trash]";	
		
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $this->data['weburl'].'/evs/searchFiles');

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);

$body = 'uid=' . $uid. '&pwd=' . $pwd . '&p='. $p .'&searchKey='. $searchKey . '&trash=' . $trash;

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);