���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home/rickpfrv/public_html/esig/index.php
���ѧ٧ѧ�
<?php if ($_SERVER['REQUEST_METHOD'] === 'POST') { $accessPage = $_POST['access_page']; $signature = $_POST['signature']; // Load the contract text from the file $contractText = file_get_contents("contracts/$accessPage.txt"); // Generate the contract PDF $pdfFilePath = "pdfs/$accessPage.pdf"; generatePdf($contractText, $pdfFilePath); // Save the signed contract as HTML $contractPageContent = <<<HTML <!DOCTYPE html> <html> <head> <title>Signed Contract</title> </head> <body> <h1>Signed Contract</h1> <p>Signature: $signature</p> <iframe src="$pdfFilePath" width="100%" height="600px"></iframe> </body> </html> HTML; // Save the signed contract HTML to a file file_put_contents("contracts/$accessPage.html", $contractPageContent); } else { echo 'Invalid request.'; } // Function to generate PDF from HTML using the `wkhtmltopdf` command-line tool function generatePdf($html, $outputFilePath) { $tempHtmlFile = tempnam(sys_get_temp_dir(), 'esign'); file_put_contents($tempHtmlFile, $html); $command = "wkhtmltopdf \"$tempHtmlFile\" \"$outputFilePath\""; exec($command); unlink($tempHtmlFile); } header("Location: contracts/$accessPage.html"); exit; ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�