8.0), we proceed and set the required cURL options * * NOTES: * The cURL option CURLOPT_SSLVERSION can have a value of 0-6 * see this URL for more details: * http://php.net/manual/en/function.curl-setopt.php * 0 is the default value and is used by the PHP API client class */ $curl_options = [ CURLOPT_PROTOCOLS => CURLPROTO_HTTPS, CURLOPT_URL => $controllerurl, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => false, CURLOPT_VERBOSE => true, CURLOPT_SSLVERSION => 0, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, ]; curl_setopt_array($ch, $curl_options); /** * $results contains the output as returned by the cURL request, * returns true when successful, else returns false */ print PHP_EOL . 'verbose output from the cURL request:' . PHP_EOL; $results = curl_exec($ch); print PHP_EOL . 'curl_getinfo output:' . PHP_EOL; print_r(curl_getinfo($ch)); /** * If we receive a cURL error, output it before the results */ if (curl_errno($ch)) { print PHP_EOL . 'cURL error: ' . curl_error($ch) . PHP_EOL; } print PHP_EOL . 'test result:' . PHP_EOL; if ($results) { print 'Controller connection success' . PHP_EOL; die; } print 'Controller connection failed' . PHP_EOL; } else { print PHP_EOL . 'ERROR: cURL could not be initialized!' . PHP_EOL; }