back-end ustreamer, GPS, timelapse, and photo-refresh site working
This commit is contained in:
17
files/image_refresh_php/index.php
Normal file
17
files/image_refresh_php/index.php
Normal file
@ -0,0 +1,17 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Dynamic Image Update</title>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<img id="refreshedImage" src="getImage.php" width="400" alt="Refreshed Image">
|
||||
<script>
|
||||
// Function to update the image every second using AJAX
|
||||
setInterval(function() {
|
||||
$('#refreshedImage').attr('src', 'getImage.php?_=' + new Date().getTime()); // Adding timestamp to avoid caching
|
||||
}, 1000);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user