最もシンプル(?)な画像出力CGI

ただ既存の画像を無加工で吐き出すだけ。

#!/uer/local/bin/perl

open(IN,"a.jpg");
binmode IN;
binmode STDOUT;

print "Content-type: image/jpg\r\n\r\n";
while(my $n = read(IN, my $buf, 1024)){
  print $buf;
}

close(IN);

2 Comments.

Leave a comment
  1. I see a lot of interesting posts on your blog. You have to
    spend a lot of time writing, i know how to save you a lot
    of work, there is a tool that creates unique, SEO friendly articles in couple of minutes, just type in google – k2
    unlimited content

  2. You condlu’t pay me to ignore these posts!

Leave a Reply

( Ctrl + Enter )