| Line | |
|---|
| 1 | <?php
|
|---|
| 2 | include('../../Common/Global.php');
|
|---|
| 3 |
|
|---|
| 4 | $Config['Web']['ShowPHPError'] = true;
|
|---|
| 5 | while (1)
|
|---|
| 6 | {
|
|---|
| 7 | $ModifyTime = filemtime('webcam.jpg');
|
|---|
| 8 | if ((time() - $Config['Web']['WebcamRefresh']) >= $ModifyTime)
|
|---|
| 9 | {
|
|---|
| 10 | // $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 '.($Config['Web']['WebcamRefresh']).' --limit-rate=200k');
|
|---|
| 11 | $Output = shell_exec('wget "http://kamera-knihovna/cgi-bin/viewer/video.jpg" -O webcam_cache.jpg -T '.($Config['Web']['WebcamRefresh']).' --limit-rate=200k');
|
|---|
| 12 |
|
|---|
| 13 | if ((strpos($Output, 'failed') === false) and (strpos($Output, 'error') === false))
|
|---|
| 14 | shell_exec('mv -f webcam_cache.jpg webcam.jpg');
|
|---|
| 15 | }
|
|---|
| 16 | //echo('.');
|
|---|
| 17 | Sleep($Config['Web']['WebcamRefresh']);
|
|---|
| 18 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.