PHP
Chilkat2 PHP
HTTPS GET using SSL/TLS
See more HTTP Examples
To retrieve a resource using SSL/TLS (i.e. HTTPS), simply use a URL that begins with "https://". (This applies to any Chilkat HTTP method that has a URL argument, such as QuickGetStr, GetHead, QuickDeleteStr, etc.)Chilkat PHP Downloads
<?php
use Chilkat2\Http;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
$http = new Http();
// Send the HTTP GET and return the content in a string.
try {
$html = $http->QuickGetStr('https://www.chilkatsoft.com/helloWorld.json');
} catch (\Chilkat2\Exception $e) {
echo $e->getMessage(), "\n";
exit;
}
echo $html, "\n";