source: trunk/Modules/WebCam/webcam_refresh.php@ 579

Last change on this file since 579 was 579, checked in by chronos, 11 years ago
  • Upraveno: Vylepšena třída Config. Měla by později umět ukládat jak do souborů tak do databáze.
File size: 788 bytes
Line 
1<?php
2include('../../Common/Global.php');
3
4$Config['Web']['ShowPHPError'] = true;
5while(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.