Changeset 41 for www/webcam
- Timestamp:
- Feb 1, 2008, 9:55:02 PM (17 years ago)
- Location:
- www/webcam
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
www/webcam
- Property svn:ignore
-
old new 1 1 webcam_cache.jpg 2 nohup.out
-
- Property svn:ignore
-
www/webcam/index.php
r31 r41 4 4 ShowHeader('Kamera', 'Webová kamera'); 5 5 6 $ReloadPeriod = 2000; // ms6 $ReloadPeriod = $Config['Web']['WebcamRefresh'] * 1000; // ms 7 7 8 8 echo(' … … 36 36 </script>'); 37 37 38 echo('<br><div align="center"><img name="theImage" src="" idth="640" height="480" alt="Webcam image"><br>Poslední aktualizace: '.date('j.n.Y G:i', filemtime('webcam.jpg')).'< /div><br>');38 echo('<br><div align="center"><img name="theImage" src="" idth="640" height="480" alt="Webcam image"><br>Poslední aktualizace: '.date('j.n.Y G:i', filemtime('webcam.jpg')).'<br>Obnovování po '.$Config['Web']['WebcamRefresh'].' sekundách</div><br>'); 39 39 40 40 echo('<strong>Kamery v okolí:</strong><br><a href="http://www.inext.cz/webkamera_updated.htm">Ulice nádražní a Smetanova Vsetín</a><br>'); -
www/webcam/webcam_refresh.php
r31 r41 1 1 <?php 2 2 include('../global.php'); 3 4 $RefreshPeriod = 1;5 6 //Header('Content-type: image/jpeg');7 // Header("Cache-Control: no-cache");8 // Header("Pragma: no-cache");9 3 10 4 while(1) 11 5 { 12 6 $ModifyTime = filemtime('webcam.jpg'); 13 if((time() - $ RefreshPeriod) >= $ModifyTime)7 if((time() - $Config['Web']['WebcamRefresh']) >= $ModifyTime) 14 8 { 15 exec('wget "http://kamera-stred/Webcam.jpg?MobilePass='.$Config['Web']['WebcamPassword'].'&V=2&Q=2&B=2&U=0" -O webcam_cache.jpg'); 16 exec('mv -f webcam_cache.jpg webcam.jpg'); 9 $Output = shell_exec('wget "http://kamera-stred/Webcam.jpg?MobilePass='.$Config['Web']['WebcamPassword'].'&V=2&Q=2&B=2&U=0" -O webcam_cache.jpg -T 2'); 10 if((strpos($Output, 'failed') === false) and (strpos($Output, 'error') === false)) 11 shell_exec('mv -f webcam_cache.jpg webcam.jpg'); 17 12 } 13 //echo('.'); 14 Sleep($Config['Web']['WebcamRefresh']); 15 } 18 16 19 //echo(file_get_contents('webcam.jpg'));20 Sleep(1);21 }22 17 ?>
Note:
See TracChangeset
for help on using the changeset viewer.