PHP ActiveX
PHP ActiveX
Example: Http.GetServerCert method
Demonstrates how to call the GetServerCert method.Chilkat PHP ActiveX Downloads
<?php
$success = 0;
$http = new COM("Chilkat.Http");
$cert = new COM("Chilkat.Cert");
$success = $http->GetServerCert('chilkatsoft.com',443,$cert);
if ($success == 0) {
print $http->LastErrorText . "\n";
exit;
}
print $cert->SubjectDN . "\n";
print $cert->ValidToStr . "\n";
// Output:
// CN=*.chilkatsoft.com
// Wed, 10 Jun 2026 23:59:59 GMT
?>