SaasposeApp::$AppSID = "77*****************";
SaasposeApp::$AppKey = "89************8";
SaasposeApp::$OutPutLocation = getcwd() . "\\Output\\";
$inputDocument = "MainDocument.doc";
$password = "abc";
$protectionType = "AllowOnlyComments";
$fieldsArray = array('Password'=>$password, 'ProtectionType'=>$protectionType);
$json = json_encode($fieldsArray);
$strURI = 'http:
$signedURI = Utils::Sign($strURI);
Utils::processCommand($signedURI, "PUT", "json", $json);
$strURI = 'http:
$signedURI = Utils::Sign($strURI);
$responseStream = Utils::processCommand($signedURI, "GET", "", "");
$outputFile = SaasposeApp::$OutPutLocation . $inputDocument;
Utils::saveFile($responseStream, $outputFile);