iwa-panda2

Manage Weather Data by International Weather Agency (Version 2)
Log | Files | Refs | README

commit d848613567b916b2a08049e80b7d72c3901054dc
parent fc195efe1bb213f3ca259b712bb0a89503130065
Author: Friedel Schön <[email protected]>
Date:   Sun, 18 Jun 2023 23:54:22 +0200

xml header fix

Diffstat:
MController/hdata/hdata.php | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Controller/hdata/hdata.php b/Controller/hdata/hdata.php @@ -1,18 +1,21 @@ <?php function make_table(){ $key = new Key(); +header('Content-Type: application/xml'); if (isset($_GET['downloadXml'])) { - header('Content-Type: application/xml'); $humidityXml = $key->retrieveHumidityTable('ae9c50dc5cd58c538a0d6aedb17fffedcaffd568d22381dab3ae72baaeb24684', true); $hDataXml = $key->retrieveHData('ae9c50dc5cd58c538a0d6aedb17fffedcaffd568d22381dab3ae72baaeb24684', true); + echo '<?xml version="1.0" encoding="UTF-8"?>' echo "<weather><humidity>$humidityXml</humidity><hdata>$hDataXml</hdata></weather>"; exit(); } else{ - return $key->retrieveHData('3jvl/yb?sRr80s6lTdeOyxV9VTQZkCPRp/bKOWKFWxfL2vhsU4Hhpgcmz9qe0zEk'); + echo '<?xml version="1.0" encoding="UTF-8"?>' + echo $key->retrieveHData('3jvl/yb?sRr80s6lTdeOyxV9VTQZkCPRp/bKOWKFWxfL2vhsU4Hhpgcmz9qe0zEk'); + exit(); } } ?>