Feltettem ide: vidserver-0.2.tar.gz
A fentnevezett jpeg ke'p meg igazabol egy php, ami ez:
<?php
$VIDSERVER_HOST="huvava.elte.hu";
$VIDSERVER_PORT=9717;
header("Content-type: image/jpeg");
if ( isset($_GET['refresh']) )
{ $refresh=$_GET['refresh'];
if ( $refresh >= 1 ) $orf=$refresh;
else $orf=1;
header("Refresh: $orf");
}
$f=fsockopen($VIDSERVER_HOST,$VIDSERVER_PORT);
$timedata=gettimeofday();
$time=$timedata['sec'];
$hsec=(integer)$timedata['usec']/10000.0;
$hstr=sprintf("%02d",$hsec);
$dstr=date("Y.m.d H:i:s.$hstr");
if ( isset($_GET['small']) )
{ $sstr="http://szofi.elte.hu";
$command ="grab --format jpeg,quality=85 --close --size 320,240 ";
$command.="--draw \"text 10,215 ' $sstr '\" ";
$command.="--draw \"text 170,215 ' $dstr '\" ";
fwrite($f,$command."\n");
}
else
{ $sstr="http://szofi.elte.hu (/~apal/webcam)";
$command ="grab --format jpeg,quality=70 --close --size 640,480 ";
$command.="--draw \"text 10,455 ' $sstr '\" ";
$command.="--draw \"text 490,455 ' $dstr '\" ";
fwrite($f,$command."\n");
}
while ( ! feof($f) )
{ $content=fread($f,8192);
echo($content);
}
fclose($f);
?>
Ehhez me'g kell egy kis .htaccess-konfig is:
AddHandler application/x-httpd-php .jpeg
es minden jo...
Sajnos a cucc (maga a vidserver) elegge gyengen doksizott (lasd me'g: ures halmaz), es a program sincs nagyon ellatva kommentekkel, de ha van/lenne ra' igeny, csinalok valamit.