Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
setInterval(function () {
$.ajax({
url: "getdata.php",
dataType: "json",
success: mysuccess
});
}, 1000);
function mysuccess(data) {
for (var i = 0; i < data.length; i++) {
if (data[i]) {
document.getElementById("status" + (i + 1)).src = "images/bar10.gif";
} else {
document.getElementById("status" + (i + 1)).src = "images/bar1.gif";
}
}
}
<?php
$status = Array(1,1,0,0);
echo json_encode($status);
?>