From 2c3408e522886e3e62fa1f7c4e85fc6e5089cf8c Mon Sep 17 00:00:00 2001 From: Danny Date: Sun, 31 Mar 2024 17:45:53 +0200 Subject: [PATCH] Limit Grid square to 6 chars in request to df2et.de API --- application/controllers/Sattimers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/Sattimers.php b/application/controllers/Sattimers.php index bdcfdcfd..7906df9c 100644 --- a/application/controllers/Sattimers.php +++ b/application/controllers/Sattimers.php @@ -15,10 +15,10 @@ class Sattimers extends CI_Controller { $footerData['scripts'] = [ 'assets/js/sections/sattimers.js?' ]; - $url = 'https://www.df2et.de/tevel/api2.php?grid='.strtoupper($this->stations->find_gridsquare()); + $data['gridsquare'] = substr(strtoupper($this->stations->find_gridsquare()), 0, 6); + $url = 'https://www.df2et.de/tevel/api2.php?grid=' . $data['gridsquare']; $json = file_get_contents($url); $data['activations'] = json_decode($json, true)['data']; - $data['gridsquare'] = strtoupper($this->stations->find_gridsquare()); $data['page_title'] = "Satellite Timers";