Return to Snippet

Revision: 66665
at June 19, 2014 19:32 by johansonkatherine


Initial Code
use Aspose\Cloud\Common\AsposeApp;
use Aspose\Cloud\Common\Product;
use Aspose\Cloud\Common\Utils;
use Aspose\Cloud\Words\Document;

/**** Section 1 ****/
Product::$baseProductUri = 'http://api.aspose.com/v1.1';
AsposeApp::$appSID = "xxxxxxxxxxxxxxxxxxxxxxxx";
AsposeApp::$appKey = "xxxxxxxxxxxxxxxxxxxxxxxx";
AsposeApp::$outPutLocation = getcwd() . "/output/";
/**** End Section 1 ****/

/**** Section 2 ****/
$fileName = "Test.docx";
$password = "123456";
$protectionType = "AllowOnlyComments";

$doc = new Document($fileName);
$result = $doc->protectDocument($password, $protectionType);
/**** End Section 2 ****/

Initial URL
http://www.aspose.com/blogs/aspose-products/aspose-for-cloud-apis/archive/2014/06/11/apply-or-amend-protection-and-unprotection-on-word-processing-documents-using-aspose-cloud-sdk-for-php.html

Initial Description
The following technical tip shows how php developers can protect their word documents in cloud using Aspose for Cloud SDK in php.

Initial Title
PHP Code to Protect a Word Document Using Aspose for Cloud API

Initial Tags
files

Initial Language
PHP