/**** Section 1 ****/ $appSID = ’b1a1b925-cbd0-40c3-b7d5-075c93601243’ $appKey = ‘343ebf767f3f53537a45ced31d6be34f’; //build URI to merge PDFs $strURI = ‘http://api.aspose.com/v1.1/pdf/MergedFile.pdf/merge’; //sign URI $signedURI = sign($strURI, $appSID, $appKey); /**** End Section 1 ****/ /**** Section 2 ****/ //Build JSON to post $documentsList = array(‘List’=> array(‘input1.pdf’, ‘input2.pdf’, ‘input3.pdf’)); $json = json_encode($documentsList); /**** End Section 2 ****/ /**** Section 3 ****/ $responseStream = processCommand($signedURI, ‘PUT’, ‘json‘, $json); /**** End Section 3 ****/ /**** Section 4 ****/ //Download merged PDF //build URI $strURI = ‘http://stage.aspose.com/v1.1/storage/file/MergedFile.pdf’; //sign URI $signedURI = sign($strURI, $appSID, $appKey); $responseStream = processCommand($signedURI, “GET”, “”, “”); $outputPath = getcwd() . ‘/output/MergedFile.pdf’; saveFile($responseStream, $outputPath); echo ‘Files have been merged and output file has been saved at: ‘ . $outputPath; /**** End Section 4 ****/