Changeset 41 for www/webcam/webcam_refresh.php
- Timestamp:
- Feb 1, 2008, 9:55:02 PM (17 years ago)
- Location:
- www/webcam
- Files:
-
- 2 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/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.