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