$url, CURLOPT_RETURNTRANSFER => true, CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_DNS_CACHE_TIMEOUT => 10, CURLOPT_TIMEOUT => 10, CURLOPT_SSL_VERIFYPEER => $this->verifyssl, CURLOPT_USERAGENT => 'TwoFactorAuth', )); $data = curl_exec($curlhandle); if ($data === false) { throw new QRException(curl_error($curlhandle)); } if (PHP_MAJOR_VERSION < 8) { curl_close($curlhandle); } return $data; } }