source: trunk/webcam/webcam_refresh.php@ 176

Last change on this file since 176 was 41, checked in by george, 17 years ago

Opraveno: Periodické obnovování snímku webkamery.

File size: 514 bytes
Line 
1<?php
2include('../global.php');
3
4while(1)
5{
6 $ModifyTime = filemtime('webcam.jpg');
7 if((time() - $Config['Web']['WebcamRefresh']) >= $ModifyTime)
8 {
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');
12 }
13 //echo('.');
14 Sleep($Config['Web']['WebcamRefresh']);
15}
16
17?>
Note: See TracBrowser for help on using the repository browser.