From ef3970cda958200350b987c8cc1804c09dbd4496 Mon Sep 17 00:00:00 2001 From: TimZ99 Date: Thu, 9 Jan 2020 22:26:03 +0100 Subject: [PATCH] Changed $result to array --- src/includes/functions.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/includes/functions.inc.php b/src/includes/functions.inc.php index 783aa795..5ca3ab09 100644 --- a/src/includes/functions.inc.php +++ b/src/includes/functions.inc.php @@ -390,7 +390,7 @@ namespace { * @param string|bool $website_password Password website * @param string|null $request_method Request method like GET, POST etc. * @param string|null $post_field POST data - * @return string cURL result + * @return array cURL result */ function psm_curl_get( $href, @@ -418,6 +418,7 @@ namespace { curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); curl_setopt($ch, CURLOPT_ENCODING, ''); + curl_setopt($ch, CURLOPT_CERTINFO, 1); if (!empty($request_method)) { curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $request_method); @@ -455,7 +456,9 @@ namespace { PSM_VERSION . '; +https://github.com/phpservermon/phpservermon)'); } - $result = curl_exec($ch); + $result['exec'] = curl_exec($ch); + $result['info'] = curl_getinfo($ch); + curl_close($ch); if (defined('PSM_DEBUG') && PSM_DEBUG === true && psm_is_cli()) {