Skip to content
This repository has been archived by the owner on Aug 21, 2019. It is now read-only.

Commit

Permalink
show errors while getting image from DWD
Browse files Browse the repository at this point in the history
  • Loading branch information
paresy committed Sep 3, 2018
1 parent 363447c commit a42a348
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Unwetterzentrale/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@ public function RequestInfo()
$context = stream_context_create($opts);

$remoteImage = "https://www.dwd.de/DWD/wetter/radar/rad_" . $this->ConvertArea($area) ."_akt.jpg";
$data = @file_get_contents($remoteImage, false, $context);
$data = file_get_contents($remoteImage, false, $context);

if($data === false) {
return;
}

$this->SendDebug($http_response_header[0], $remoteImage, 0);

if((strpos($http_response_header[0], "200") === false)) {
Expand Down

0 comments on commit a42a348

Please sign in to comment.