Wetteruerdingen (http://www.wetteruerdingen.de/index.php)
- Wetter Software (http://www.wetteruerdingen.de/board.php?boardid=4)
-- Weather Display (http://www.wetteruerdingen.de/board.php?boardid=5)
--- Iwdl (http://www.wetteruerdingen.de/thread.php?threadid=222)


Geschrieben von Charly am 10.05.2020 um 09:18:

  Iwdl

Das ist die yrno



Geschrieben von WLPD am 12.05.2020 um 22:10:

  RE: Iwdl

Sorry, I have to write this in english.

I don't succeed iwdl working with this fix.
Could you please check if yrno.php is correct.
I have Always learned that a php file has to start with <?php and to end with ?>

This is not the case here.

Am I missing code perhaps why the fix is not working.
Is the yrno.php file corrupt!

This is what I have in the yrno.php file.

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
<?php

if (isset($argv[1]))  {
    $city = $argv[1];

    $url = "https://www.yr.no/sted/" . $city . "/forecast.xml";

    $xml = simplexml_load_string(file_get_contents($url));
    $json = json_encode($xml, TRUE);

    echo $json;
}

if (isset($_GET['url'])) {
    $url = $_GET['url'];

    $xml = simplexml_load_string(file_get_contents($url));
    $json = json_encode($xml, TRUE);

    echo $json;
}


TIA



Geschrieben von Charly am 13.05.2020 um 19:44:

  RE: Iwdl

Hi
my php file looks the same.
And with me it works.

IWDL

It is not OK

<meta charset="UTF-8" />
<title>iWDL</title>
</head>
<body>
<script type="text/javascript" src="http://www.westland-depoel.nl/stat/track.php?mode=js"></script>
<div id="startup" style='background-color: black; margin: 0; padding: 0'>
</div>


That's the way it has to be

<meta charset="UTF-8" />
<title>iWDL</title>
</head>
<body>
<div id="startup" style='background-color: black; margin: 0; padding: 0'>
</div>



Geschrieben von Charly am 13.05.2020 um 20:09:

  RE: Iwdl

Zitat:
Original von Charly
Hi
my php file looks the same.
And with me it works.

IWDL

It is not OK

<meta charset="UTF-8" />
<title>iWDL</title>
</head>
<body>
<script type="text/javascript" src="http://www.westland-depoel.nl/stat/track.php?mode=js"></script>
<div id="startup" style='background-color: black; margin: 0; padding: 0'>
</div>


That's the way it has to be

<meta charset="UTF-8" />
<title>iWDL</title>
</head>
<body>
<div id="startup" style='background-color: black; margin: 0; padding: 0'>
</div>


Meine INdex benutze die mal.



Geschrieben von WLPD am 14.05.2020 um 20:09:

 

Thank you for your reply.

Sorry, I cannot get it to work.

code:
1:
<script type="text/javascript" src="http://www.westland-depoel.nl/stat/track.php?mode=js"></script> 


This is the code for my websitecounter.
It has Always worked with that code in it.
I did delete that part, saved the file and uploaded it.

Did not work.

I used your index file also but that didn't make a difference.
Still not working.

Take a look here.
Your index file and the countercode removed.

http://www.westland-depoel.nl/iwdl/

"Gegevens worden opgehaald" means that data is getting downloaded.



Geschrieben von Charly am 14.05.2020 um 20:13:

 

Zitat:
Original von WLPD
Thank you for your reply.

Sorry, I cannot get it to work.

code:
1:
<script type="text/javascript" src="http://www.westland-depoel.nl/stat/track.php?mode=js"></script> 


This is the code for my websitecounter.
It has Always worked with that code in it.
I did delete that part, saved the file and uploaded it.

Did not work.

I used your index file also but that didn't make a difference.
Still not working.

Take a look here.
Your index file and the countercode removed.

http://www.westland-depoel.nl/iwdl/


if you want I can give you my whole IWDL folder.

"Gegevens worden opgehaald" means that data is getting downloaded.



Geschrieben von Charly am 14.05.2020 um 20:26:

 

[quote]Original von Charly
[quote]Original von WLPD
Thank you for your reply.

Sorry, I cannot get it to work.

code:
1:
<script type="text/javascript" src="http://www.westland-depoel.nl/stat/track.php?mode=js"></script> 


This is the code for my websitecounter.
It has Always worked with that code in it.
I did delete that part, saved the file and uploaded it.

Did not work.

I used your index file also but that didn't make a difference.
Still not working.

Take a look here.
Your index file and the countercode removed.

http://www.westland-depoel.nl/iwdl/


if you want I can give you my whole IWDL folder.

"Gegevens worden opgehaald" means that data is getting downloaded.[



Geschrieben von WLPD am 14.05.2020 um 20:48:

 

Lets check one more thing.

In your iwdl.js do you have the same code at function getForecast() {
Pay attention to the forward slashes //

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
function getForecast() {
//    if ($("#fc").html() != "") return;
    var now = new Date();
    now = now.getTime();

    if (typeof getForecast.last_update == 'undefined') getForecast.last_update = 0;
    if (getForecast.last_update + 3600000 > now) return;
    getForecast.last_update = now;

    if (settings["forecast"] == "yr.no") {
        // url='https://www.yr.no/sted/' + encodeURI(settings["yr.no"]) + '/forecast.xml';
        // url += "?callback=?&t=" + now;

        // $.getJSON(url, function(fc) {
	    var fc = JSON.parse(makeSyncRequest("yrno.php?url=" + 'https://www.yr.no/sted/' + encodeURI(settings["yr.no"]) + '/forecast.xml'));
            var i = 0;
            var date = '';
            var str;



Geschrieben von Charly am 14.05.2020 um 20:53:

 

code:
1:
function getForecast() { //    if ($("#fc").html() != "") return;     var now = new Date();     now = now.getTime();      if (typeof getForecast.last_update == 'undefined') getForecast.last_update = 0;     if (getForecast.last_update + 3600000 > now) return;     getForecast.last_update = now;      if (settings["forecast"] == "yr.no") {         // url='https://www.yr.no/sted/' + encodeURI(settings["yr.no"]) + '/forecast.xml';         // url += "?callback=?&t=" + now;          // $.getJSON(url, function(fc) { 	    var fc = JSON.parse(makeSyncRequest("yrno.php?url=" + 'https://www.yr.no/sted/' + encodeURI(settings["yr.no"]) + '/forecast.xml'));             var i = 0;             var date = '';             var str;             while (i < 30 && fc.forecast.tabular.time[i]) {                 var t = fc.forecast.tabular.time[i];                 var dt = t['@attributes'].from.replace(/T.*/, "");                 var stime = t['@attributes'].from.replace(/.*T/, "");                 var etime = t['@attributes'].to.replace(/.*T/, "");                 var p = t['@attributes'].period;                 var sym = t.symbol['@attributes'].number;                 if (sym.length == 1) sym = '0' + sym;                 var c_temp = check_convert(t.temperature['@attributes'].value, 'c');                 var c_wind = check_convert(roundNumber(t.windSpeed['@attributes'].mps / 0.514444, 1), 'kn');                 var c_wdir = check_convert(t.windDirection['@attributes'].deg, 'deg');                 var c_baro = check_convert(t.pressure['@attributes'].value, 'hpa');                  if (i == 0)                     str = "<table class='w100'><tr><td></td><td></td><td class='iwdl center bold'>" + c_temp.units + "</td><td class='iwdl center bold'>" +                        c_wdir.units + "</td><td class='iwdl center bopld'>" + c_wind.units + "</td><td class='iwdl center bold'>" + c_baro.units + "</td><td>";



Geschrieben von WLPD am 14.05.2020 um 20:59:

 

Thanks.

Same code.
I will get back to you for the iwdl folder großes Grinsen
I'll let you know.

Tough one this and I really like to know what is causing this.
I will investigate some more.

Once again Thanks

Hopefully someone else will install these files and if it is working for them.



Geschrieben von Charly am 14.05.2020 um 22:13:

 

Hi
I think I found the bug.
In the iwdl_settings.js

/ Where to get the forecast; go to http://yr.no, find the forecast for your location
// and fill in the last part of the url like below.
settings ["yr.no"] =

Your location is there but yrno doesn't know it.
you have to set a location that yrno knows.



Geschrieben von WLPD am 15.05.2020 um 14:31:

 

I had checked if my location existed and it existed.

https://www.yr.no/sted/Netherlands/South_Holland/Poeldijk/

or

https://www.yr.no/place/Netherlands/South_Holland/Poeldijk/

I copied your iwdl folder to my server.
I only changed the path to my clientraw.txt, nothing else.

Forecast for your place isn't working.
It says "Ladend...

verwirrt verwirrt verwirrt verwirrt verwirrt verwirrt böse

I am going slightly mad großes Grinsen

Check it out http://www.westland-depoel.nl/iwdl



Geschrieben von Charly am 15.05.2020 um 16:41:

 

Zitat:
Original von WLPD
I had checked if my location existed and it existed.

https://www.yr.no/sted/Netherlands/South_Holland/Poeldijk/

or

https://www.yr.no/place/Netherlands/South_Holland/Poeldijk/

I copied your iwdl folder to my server.
I only changed the path to my clientraw.txt, nothing else.

Forecast for your place isn't working.
It says "Ladend...

verwirrt verwirrt verwirrt verwirrt verwirrt verwirrt böse

I am going slightly mad großes Grinsen

Check it out http://www.westland-depoel.nl/iwdl

Did you also load the iwdl.js on your server.


Try the file with me it works.

http://wetter-uerdingen.de/iwdl/#home



Geschrieben von WLPD am 15.05.2020 um 20:28:

 

I'll try these files tomorrow.
It's working fine on YOUR server.
Mine seems to give a problem.
I'll let you know tomorrow.
Have a nice weekend.



Geschrieben von Charly am 15.05.2020 um 20:32:

 

Zitat:
Original von WLPD
I'll try these files tomorrow.
It's working fine on YOUR server.
Mine seems to give a problem.
I'll let you know tomorrow.
Have a nice weekend.

Have a nice weekend.



Geschrieben von Charly am 18.05.2020 um 22:13:

 

It is important that this file is replaced, otherwise it will not work.


iwdl.js



Geschrieben von WLPD am 18.05.2020 um 22:33:

 

Hi Charly,

No luck, the 2 files you send me did not work for me.
I only changed the path to MY clientraw.txt file.

I am on php version 7.2.30

Do you know what version you are using?
Maybe it is a php thing.

I contacted Quart from Sweden, he said on the weatherwatch forum that he was interested also to get the forecast going again.

I told him you uploaded a fix and if he is still interested.
I am curious if he succeeds getting it to work.

I appreciate it you want me to help to get it to work.
Thanks.



Geschrieben von Charly am 18.05.2020 um 22:37:

 

ich habe php 7.3



Geschrieben von Charly am 18.05.2020 um 22:44:

 

Compare the two files, something is wrong.



Geschrieben von Charly am 19.05.2020 um 17:38:

 

Maybe you can send me your iwdl folder
then I'll see where the error is.


Forensoftware: Burning Board 2.3.4, entwickelt von WoltLab GmbH