From 36e21c2380e8461b6ca81e40b155c5c4f41af4d6 Mon Sep 17 00:00:00 2001 From: Steven Dodd Date: Thu, 31 Jul 2025 15:55:07 +0100 Subject: [PATCH] Forced http version and added compression --- application/controllers/Qrz.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/controllers/Qrz.php b/application/controllers/Qrz.php index e06b02ff..d32a88e1 100644 --- a/application/controllers/Qrz.php +++ b/application/controllers/Qrz.php @@ -324,7 +324,7 @@ class Qrz extends CI_Controller { // Return the structured error array here too for consistency return ['status' => 'error', 'message' => $error_message]; } - $url = 'http://logbook.qrz.com/api'; // Correct URL + $url = 'https://logbook.qrz.com/api'; // Correct URL $post_data['KEY'] = $qrz_api_key; // Correct parameter $post_data['ACTION'] = 'FETCH'; // Correct parameter @@ -338,6 +338,9 @@ class Qrz extends CI_Controller { curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true); // Correct - get response as string curl_setopt( $ch, CURLOPT_TIMEOUT, 300); // 5 minute timeout curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 30); // 30 second connection timeout + curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); + curl_setopt($ch, CURLOPT_BUFFERSIZE, 128000); + curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate'); $content = curl_exec($ch); // Get raw content $curl_error = curl_error($ch); // Check for cURL errors