PHP
Chilkat2 PHP
Example: Crypt2.GetSignatureSigningTimeStr method
Demonstrates how to call the GetSignatureSigningTimeStr method.Chilkat PHP Downloads
<?php
use Chilkat2\Crypt2;
$crypt = new Crypt2();
try {
$crypt->VerifyP7M('qa_data/cades/CAdES-T/Signature-C-T-1.p7m', 'qa_output/out.dat');
} catch (\Chilkat2\Exception $e) {
echo $e->getMessage(), "\n";
exit;
}
$numSigners = $crypt->NumSignerCerts;
echo 'Num Signers = ', $numSigners, "\n";
$i = 0;
while ($i < $numSigners) {
if ($crypt->HasSignatureSigningTime($i)) {
echo $i + 1, ': ', $crypt->GetSignatureSigningTimeStr($i), "\n";
} else {
echo $i + 1, ": has no signing time.\n";
}
$i = $i + 1;
}
// Sample output:
// Num Signers = 1
// 1: Sun, 03 Dec 2013 06:57:41 GMT