#!/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; } } } } McCrohan
aboutsummaryrefslogtreecommitdiffstats
path: root/FAQ (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2000-04-03[lcd4linux @ 2000-04-03 04:46:38 by reinelt]reinelt7-17/+88
2000-04-03[lcd4linux @ 2000-04-03 04:01:31 by reinelt]reinelt3-8/+20
2000-04-02[lcd4linux @ 2000-04-02 22:07:10 by herp]herp1-10/+20
2000-04-01[lcd4linux @ 2000-04-01 22:40:42 by herp]herp2-19/+30
2000-04-01[lcd4linux @ 2000-04-01 19:33:45 by herp]herp1-3/+9
2000-04-01[lcd4linux @ 2000-04-01 16:22:38 by reinelt]reinelt5-11/+15
2000-03-31[lcd4linux @ 2000-03-31 04:41:22 by reinelt]reinelt1-63/+68
2000-03-30[lcd4linux @ 2000-03-30 16:46:57 by reinelt]reinelt9-77/+1153
2000-03-28[lcd4linux @ 2000-03-28 08:48:33 by reinelt]reinelt2-7/+56
2000-03-28[lcd4linux @ 2000-03-28 07:22:15 by reinelt]reinelt9-186/+447
2000-03-26[lcd4linux @ 2000-03-26 20:00:44 by reinelt]reinelt4-23/+92
2000-03-26[lcd4linux @ 2000-03-26 19:03:52 by reinelt]reinelt5-10/+33
2000-03-26[lcd4linux @ 2000-03-26 18:46:28 by reinelt]reinelt10-117/+163
2000-03-26[lcd4linux @ 2000-03-26 12:55:03 by reinelt]reinelt3-25/+85
2000-03-25[lcd4linux @ 2000-03-25 05:50:43 by reinelt]reinelt10-33/+91