Hello
I'd like to display the recent Weathermap for my country (Switzerland) on my webserver
(http://wlannesslau.internet-box.ch:8000)
That's the code of the website:
<div style="width:180px;height:180px; border: 1px solid black;">
<a href="http://alarm.meteocentrale.ch/index.html" alt="Aktuelle Unwetterwarnungen für die Schweiz" title="Aktuelle Unwetterwarnungen für die Schweiz">
<img src="http://alarm.meteocentrale.ch/images/map/schweiz_preview.png" style="border: 0;" alt="Aktuelle Unwetterwarnungen für die Schweiz" />
</a>
</div>
This is my code:
- Before adding the weather code:
void handleRoot() {
char temp[400];
snprintf ( temp, 400,
"<html>\
<head>\
<title>ESP8266 Demo</title>\
<style>\
body { background-color: #F7FF00; font-family: Arial, Helvetica, Sans-Serif; Color: #000088; }\
</style>\
</head>\
<body>\
<h1>Hello from ESP8266!</h1>\
<p>SSID: %s</<p>\
<p>Passwort: %s</<p>\
<p>Temperatur: %s Grad</<p>\
<p>Feuchtigkeit: %s %</<p>\
<p>Zeit: %s </<p>\
</body>\
</html>",
ssid, password, packetBuffer, packetBuffer2, stringOne
);
server.send ( 200, "text/html", temp );
}
- After:
void handleRoot() {
char temp[400];
snprintf ( temp, 400,
"<html>\
<head>\
<title>ESP8266 Demo</title>\
<style>\
body { background-color: #F7FF00; font-family: Arial, Helvetica, Sans-Serif; Color: #000088; }\
</style>\
</head>\
<body>\
<h1>Hello from ESP8266!</h1>\
<p>SSID: %s</<p>\
<p>Passwort: %s</<p>\
<p>Temperatur: %s Grad</<p>\
<p>Feuchtigkeit: %s %</<p>\
<p>Zeit: %s </<p>\
<div style=\"/width:180px;height:180px; border: 1px solid black;\" />\
<a href=\"/http://alarm.meteocentrale.ch/index.html\" />\ alt=\"/Aktuelle Unwetterwarnungen für die Schweiz\" />\ title=\"/Aktuelle Unwetterwarnungen für die Schweiz\" />\
<img src=\"/http://alarm.meteocentrale.ch/images/map/schweiz_preview.png\" />\ style=\"/border: 0;\" />\ alt=\"/Aktuelle Unwetterwarnungen für die Schweiz\" />\
</a>\
</div>\
</body>\
</html>",
ssid, password, packetBuffer, packetBuffer2, stringOne
);
server.send ( 200, "text/html", temp );
}
But my webserver is still the same and there is no piture on it. Could you help me?