(PHP Extension) Require that the Web Server's SSL Certificate is Non-Expired and the Signature is Valid
Demonstrates setting the RequireSslCertVerify property to require that the web server's SSL/TLS certificate is non-expired and that the certificate's signature is valid.
<?php
// The version number (9_5_0) should match version of the Chilkat extension used, omitting the micro-version number.
// For example, if using Chilkat v9.5.0.48, then include as shown here:
include("chilkat_9_5_0.php");
// This example assumes the Chilkat HTTP API to have been previously unlocked.
// See Global Unlock Sample for sample code.
$url = 'https://chilkatsoft.com';
$http = new CkHttp();
$http->put_RequireSslCertVerify(true);
$html = $http->quickGetStr($url);
if ($http->get_LastMethodSuccess() != true) {
print $http->lastErrorText() . "\n";
exit;
}
print 'Success.' . "\n";
?>
|