]> i-scream Git - www.i-scream.org.git/commitdiff
A very simple (oh i love perl) webpage for viewing download statistics
authorPaul Mutton <pjm2@i-scream.org>
Fri, 25 May 2001 17:58:28 +0000 (17:58 +0000)
committerPaul Mutton <pjm2@i-scream.org>
Fri, 25 May 2001 17:58:28 +0000 (17:58 +0000)
from the i-scream download_log

cgi-bin/logviewer.cgi [new file with mode: 0755]

diff --git a/cgi-bin/logviewer.cgi b/cgi-bin/logviewer.cgi
new file mode 100755 (executable)
index 0000000..df05c69
--- /dev/null
@@ -0,0 +1,30 @@
+#!/usr/bin/perl -w
+
+
+#------------------------------------------------------------
+# logviewer.cgi
+# 
+# i-scream download log viewer
+# Copyright Paul Mutton, 2001.
+#------------------------------------------------------------
+
+print "Content-type: text/html\n\n";
+
+print '<html><body><table border="1">';
+
+open(FILE, "<download_log");
+while($line = <FILE>) {
+    @row = split(/\|/, $line);
+    print <<EOT;
+ <tr>
+  <td>$row[0]</td>
+  <td>$row[1]</td>
+  <td>$row[2]</td>
+  <td>$row[3]</td>
+  <td>$row[4]</td>
+  <td>$row[5]</td>
+ </tr>
+EOT
+}
+
+print "</table></body></html>";
\ No newline at end of file