(PHP ActiveX) Transition from Cert.GetValidToDt to Cert.ValidToStr
Provides instructions for replacing deprecated GetValidToDt method calls with ValidToStr. Note: This example requires Chilkat v11.0.0 or greater.
<?php
// For versions of Chilkat < 10.0.0, use new COM('Chilkat_9_5_0.Chilkat.Cert')
$cert = new COM("Chilkat.Cert");
// ------------------------------------------------------------------------
// The GetValidToDt method is deprecated:
// ckdt1 is a Chilkat.CkDateTime
$ckdt1 = $cert->GetValidToDt();
if ($cert->LastMethodSuccess == 0) {
print $cert->LastErrorText . "\n";
exit;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using the ValidToStr property
// For versions of Chilkat < 10.0.0, use new COM('Chilkat_9_5_0.Chilkat.CkDateTime')
$ckdt2 = new COM("Chilkat.CkDateTime");
$ckdt2->SetFromRfc822($cert->ValidToStr);
?>
|