Test

[insert_php]
header(„Content-type: image/svg+xml“);

$cache_file = „overview.cache“;
$username = „spielwiesee@einsatz.or.at“;
$password = „spielwiese“;
$cache_time = 5; // minutes

if (file_exists($cache_file) && (filemtime($cache_file) > (time() – 60 * cache_time ))) {
echo file_get_contents($cache_file);
exit();
}

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => „https://feuerwehr.einsatz.or.at/overview“,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => „GET“,
CURLOPT_HTTPHEADER => array(
„authorization: Basic “ . base64_encode($username . „:“ . $password),
„cache-control: no-cache“,
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo „cURL Error #:“ . $err;
} else {
file_put_contents($cache_file, $response, LOCK_EX);
echo $response;
}
[/insert_php]