PHP code example of lganee / trusted-timestamps

1. Go to this page and download the library: Download lganee/trusted-timestamps library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lganee / trusted-timestamps example snippets


$requestFile = TrustedTimestamps::createRequestfile($sha1);
$signature = TrustedTimestamps::signRequestfile($requestFile, $tsa_url);
file_put_contents($signature_filename, base64_decode($signature['response_string']));

$content64 = base64_encode(file_get_contents($signature_filename));
$timestamp = TrustedTimestamps::getTimestampFromAnswer($content64);