Sample code for 30+ languages & platforms
PHP

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.

Chilkat PHP Downloads

Chilkat2 PHP
<?php

use Chilkat2\Http;

// 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 Http();
$http->RequireSslCertVerify = true;

try {
    $html = $http->QuickGetStr($url);
} catch (\Chilkat2\Exception $e) {
    echo $e->getMessage(), "\n";
    exit;
}

echo "Success.\n";