PHP Plain Samples Project
This samples project shows how to use PKI Express together with the Web PKI browser component on a PHP 5.5+ plain project (including 7.x). This project is hosted on GitHub:
https://github.com/LacunaSoftware/PkiSuiteSamples/tree/master/php/plain
Note
If you are using a previous version of PHP, please contact us.
Running The Project
Follow these steps to run the sample:
- Install PKI Express
- Download the project or clone the repository: https://github.com/LacunaSoftware/PkiSuiteSamples.git
- Navigate to the folder
/php/plain
- In a command prompt, run the command
composer install
to install the dependencies (if you don't have Composer installed, get it here) - Execute the project by running the command
composer start
- Access the URL http://localhost:8000
Project Map
This section lists where to find the relevant parts in each feature sample on the project:
Authentication With Digital Certificates
- index.php
- JavaScript: authentication-form.js
- complete.php
PAdES Signature With File Already on Server
After choosing one of the available server files (which is crudely implemented for demonstration purposes on index.php and action.php), the control flow is performed by the following files:
- index.php
- JavaScript: signature-start-form.js
- start.php
- JavaScript: signature-complete-form.js
- complete.php
PAdES Signature With File Uploaded by User
After the file upload (which is crudely implemented for demonstration purposes on upload.php) is done, the control flow is performed by the following files:
- index.php
- JavaScript: signature-start-form.js
- start.php
- JavaScript: signature-complete-form.js
- complete.php
PAdES Co-Signature
After choosing one of the available already-signed server files (which is crudely implemented for demonstration purposes on index.php and action.php), the control flow is performed by the following files:
- index.php
- JavaScript: signature-start-form.js
- start.php
- JavaScript: signature-complete-form.js
- complete.php
PAdES Signature Using a Server Key
After the file upload (which is crudely implemented for demonstration purposes on upload.php) is done, the control flow is performed by the following files:
Batch of PAdES Signatures
- index.php
- JavaScript: batch-signature-rest-form.js
- Ajax handlers: start.php and complete.php
Open/Validate an Existing PAdES Signature
After the file upload (which is crudely implemented for demonstration purposes on upload.php) is done, the control flow is performed by the following files:
Printer-Friendly Version From a PAdES Signature
Not yet available on this project.
CAdES Signature With File Already on Server
After choosing one of the available server files (which is crudely implemented for demonstration purposes on index.php and action.php), the control flow is performed by the following files:
- index.php
- JavaScript: signature-start-form.js
- start.php
- JavaScript: signature-complete-form.js
- complete.php
CAdES Signature With File Uploaded by User
After the file upload (which is crudely implemented for demonstration purposes on upload.php) is done, the control flow is performed by the following files:
- index.php
- JavaScript: signature-start-form.js
- start.php
- JavaScript: signature-complete-form.js
- complete.php
CAdES Co-Signature
After choosing one of the available already-signed server files (which is crudely implemented for demonstration purposes on index.php and action.php), the control flow is performed by the following files:
- index.php
- JavaScript: signature-start-form.js
- start.php
- JavaScript: signature-complete-form.js
- complete.php
CAdES Signature Using a Server Key
After the file upload (which is crudely implemented for demonstration purposes on upload.php) is done, the control flow is performed by the following files:
Batch of CAdES Signatures
Not yet available on this project.
Open/Validate an Existing CAdES Signature
After the file upload (which is crudely implemented for demonstration purposes on upload.php) is done, the control flow is performed by the following files:
Printer-Friendly Version From a CAdES Signature
Not yet available on this project.
Signature Package From a CAdES Signature
Not yet available on this project.
XML Signature of The Entire Document
Not yet available on this project.
XML Signature of a Brazillian NFe Document
- index.php
- JavaScript: signature-start-form.js
- start.php
- JavaScript: signature-complete-form.js
- complete.php
XML Signature of a COD Document
Not yet available on this project.
Open/Validate Signatures on an Existing XML Document
Not yet available on this project.