#!/usr/bin/perl use strict; use vars qw ($file $DELAY); ########## CONFIG $file = "lcd4linux"; # .png is appended $DELAY = 0; # delay in seconds # if delay is zero, file is sent when modified. ################# use CGI qw/:push -nph/; $| = 1; my ($mtime, $nmtime, $size, $nsize); (undef, undef, undef, undef, undef, undef, undef, $size, undef, $mtime) = stat "$file.png"; print multipart_init(-boundary=>'----------------here we go!'); while (1) { print multipart_start(-type=>'image/png'); undef $/; open(IN, "$file.png") or die("Can't read '$file.png'"); $_ = ; print $_; close(IN); print multipart_end; if ($DELAY) { sleep $DELAY; } else { W: while (1) { # sleep(1); (undef, undef, undef, undef, undef, undef, undef, $nsize, undef, $nmtime) = stat "$file.png"; if($mtime != $nmtime || $size != $nsize) { $mtime = $nmtime; $size = $nsize; last W; } } } } ght'>Jonathan McCrohan
aboutsummaryrefslogtreecommitdiffstats
path: root/install-sh (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2004-04-08[lcd4linux @ 2004-04-08 10:48:23 by reinelt]reinelt6-56/+272
2004-04-07[lcd4linux @ 2004-04-07 08:29:05 by hejl]hejl3-1/+645
2004-03-21[lcd4linux @ 2004-03-21 22:05:53 by reinelt]reinelt2-16/+19
2004-03-20[lcd4linux @ 2004-03-20 23:09:01 by reinelt]reinelt2-71/+148