IP-Symcon - Wie kann ich... 2.0

<?
// OpenWeaterMap.org  --  http://openweathermap.org/city/2950159
// Kostenlosen API Key bekommt man hier nach Anmeldung direkt angezeigt:
// http://openweathermap.org/appid#get
//
// Mit einem kostenlosen API Key kann man pro Minute bis zu 60 Abfragen machen. Pro Tag
// sind bis zu 50.000 Abfragen möglich/erlaubt. >> https://openweathermap.org/price
//
// Weitere Abfragemöglichkeiten der API sind hier zu finden (jeweils mit Beispiel-URL):
// http://openweathermap.org/api


$locationID = 2950159;  // Location ID von Berlin
$APIkey = "**************************";  // Hier den API Key eintragen

$content = Sys_GetURLContent("http://api.openweathermap.org/data/2.5/forecast/daily?id=".$locationID."&units=metric&lang=de&type=day&APPID=".$APIkey);
$json = json_decode($content);
//print_r($json);


echo "Wetterdaten für ".$json->city->name."

";

echo "Temperatur: ".$json->list[0]->temp->day."°C"."
";
echo "Temperatur (min.): ".$json->list[0]->temp->min."°C"."
";
echo "Temperatur (max.): ".$json->list[0]->temp->max."°C"."
";

echo "Luftdruck: ".$json->list[0]->pressure."hpa"."
";
echo "Luftfeuchtigkeit: ".$json->list[0]->humidity."%"."
";

echo "Windgeschwindigkeit: ".$json->list[0]->speed." Meter/Sekunde"."
";
echo "Windrichtung: ".$json->list[0]->deg." Grad"."
";
?>

Diese Infos bekommt man aktuell von der API zurück:

stdClass Object
(
    [city] => stdClass Object
        (
            [id] => ********
            [name] => *************
            [coord] => stdClass Object
                (
                    [lon] => **********
                    [lat] => ************
                )

            [country] => DE
            [population] => 0
        )

    [cod] => 200
    [message] => 0.0359
    [cnt] => 7
    [list] => Array
        (
            [0] => stdClass Object
                (
                    [dt] => 1234567890
                    [temp] => stdClass Object
                        (
                            [day] => 8.14
                            [min] => 4.65
                            [max] => 8.14
                            [night] => 4.65
                            [eve] => 6.27
                            [morn] => 7.29
                        )

                    [pressure] => 999.15
                    [humidity] => 100
                    [weather] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [id] => 500
                                    [main] => Rain
                                    [description] => leichter Regen
                                    [icon] => 10d
                                )

                        )

                    [speed] => 2.87
                    [deg] => 231
                    [clouds] => 88
                    [rain] => 2.71
                )

            [1] => stdClass Object
                (
                    [dt] => 1445079600
                    [temp] => stdClass Object
                        (
                            [day] => 6.4
                            [min] => 4.09
                            [max] => 6.92
                            [night] => 4.2
                            [eve] => 5.21
                            [morn] => 4.09
                        )

                    [pressure] => 1001.73
                    [humidity] => 100
                    [weather] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [id] => 500
                                    [main] => Rain
                                    [description] => leichter Regen
                                    [icon] => 10d
                                )

                        )

                    [speed] => 2.56
                    [deg] => 206
                    [clouds] => 80
                    [rain] => 0.74
                )

            [2] => stdClass Object
                (
                    [dt] => 1445166000
                    [temp] => stdClass Object
                        (
                            [day] => 8.14
                            [min] => 2.51
                            [max] => 8.37
                            [night] => 2.51
                            [eve] => 4.77
                            [morn] => 4.3
                        )

                    [pressure] => 1003.04
                    [humidity] => 100
                    [weather] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [id] => 500
                                    [main] => Rain
                                    [description] => leichter Regen
                                    [icon] => 10d
                                )

                        )

                    [speed] => 1.86
                    [deg] => 200
                    [clouds] => 92
                    [rain] => 0.58
                )

            [3] => stdClass Object
                (
                    [dt] => 1445252400
                    [temp] => stdClass Object
                        (
                            [day] => 8.52
                            [min] => 4.29
                            [max] => 8.52
                            [night] => 4.59
                            [eve] => 5.69
                            [morn] => 4.29
                        )

                    [pressure] => 1002.82
                    [humidity] => 0
                    [weather] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [id] => 500
                                    [main] => Rain
                                    [description] => leichter Regen
                                    [icon] => 10d
                                )

                        )

                    [speed] => 2.73
                    [deg] => 14
                    [clouds] => 71
                    [rain] => 0.28
                )

            [4] => stdClass Object
                (
                    [dt] => 1445338800
                    [temp] => stdClass Object
                        (
                            [day] => 8.47
                            [min] => 4.1
                            [max] => 8.47
                            [night] => 4.1
                            [eve] => 5.63
                            [morn] => 4.19
                        )

                    [pressure] => 1007.64
                    [humidity] => 0
                    [weather] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [id] => 500
                                    [main] => Rain
                                    [description] => leichter Regen
                                    [icon] => 10d
                                )

                        )

                    [speed] => 2.07
                    [deg] => 27
                    [clouds] => 70
                    [rain] => 0.23
                )

            [5] => stdClass Object
                (
                    [dt] => 1445425200
                    [temp] => stdClass Object
                        (
                            [day] => 8.76
                            [min] => 4.43
                            [max] => 8.76
                            [night] => 6.31
                            [eve] => 6.33
                            [morn] => 4.43
                        )

                    [pressure] => 1003.79
                    [humidity] => 0
                    [weather] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [id] => 500
                                    [main] => Rain
                                    [description] => leichter Regen
                                    [icon] => 10d
                                )

                        )

                    [speed] => 1.8
                    [deg] => 235
                    [clouds] => 7
                    [rain] => 2.23
                )

            [6] => stdClass Object
                (
                    [dt] => 1445511600
                    [temp] => stdClass Object
                        (
                            [day] => 9.68
                            [min] => 7.07
                            [max] => 9.68
                            [night] => 7.07
                            [eve] => 7.75
                            [morn] => 7.41
                        )

                    [pressure] => 999.63
                    [humidity] => 0
                    [weather] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [id] => 501
                                    [main] => Rain
                                    [description] => mäßiger Regen
                                    [icon] => 10d
                                )

                        )

                    [speed] => 3.63
                    [deg] => 286
                    [clouds] => 44
                    [rain] => 4.6
                )

        )

)