Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<script src="comment.cgi?page=home"></script>
#!/usr/bin/perl -w
use URI::Escape;
my $code = qq~<b>some <i>html</i> codes</b> <u>to print out</u> onto the page (can be anything at all)~;
# uri encode our HTML so it doesn't conflict with the JavaScript
my $enc = uri_escape($code);
# print out JS for the page
print "Content-Type: text/javascript\n\n";
print qq~
document.writeln (unescape("$enc"));
~;
<html>
<head>
<title>something</title>
</head>
<body>
<!your ssi tag here to display the comments file>
<hr>
Add your comments:<br>
<form action="cgi-bin/comments.pl" method="post">
<input type="text" name="name"><br>
<textarea name="comments"></textarea><br>
<input type="submit">
</form>
</body>
</html>
#!/usr/bin/perl
use warnings;
use strict;
use CGI qw/:standard/;
$CGI::POST_MAX = 1024 * 10; # max 10K posts
$CGI::DISABLE_UPLOADS = 1; # no uploads
my $name = param('name') or error('Enter a name');
my $comments = param('comments') or error('Enter some comments');
($name,$comments) = escapeHTML($name,$comments);
open(my $FH,">>path/to/comments.txt") or die "$!";
print $FH "<hr>Name: $name<br>Comments:<br>$comments<hr>\n";
undef $FH;
print "Location: [URL unfurl="true"]http://www.yoursite.com/comments.shtml";[/URL]
sub error{
my $error = shift;
print header,start_html,h1($error),end_html;
exit;
}