Ik heb momenteel een pagina waar je een bericht kan posten en komt mooi automatisch op de site te staan, alleen wil ik nu ook dat het geheel ook op een andere page wordt gepost...hoe doe ik dat? dit is mijn huidige script:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
use LWP::Simple;
use CGI;
chdir "/home/http/users/www.ttkdesign.nl/html/";
$filenaam = "contentreply.html";
open(F,"< $filenaam"); while (<F>) { $file.=$_ } close(F);
($begin, $eind) = split(/<!--hier eindigt de laatste reply-->/, $file);
$query = CGI::new();
$reply = $query->param("reply");
chdir "/home/http/users/www.ttkdesign.nl/html/";
open(FH, ">$filenaam");
print FH $begin;
@tijd = localtime(time);
$dag = $tijd[3];
$maand = $tijd[4]+1;
$jaar = 1900+$tijd[5];
print FH "$dag-$maand-$jaar";
print FH "<tr><TD><p>$reply</p></TD></tr>\n";
print FH "<!--hier eindigt de laatste reply-->";
print FH $eind;
close(FH);
print <<einde;
>html>
<head>
<title>Redirect</title>
<script language="JavaScript"><!--
location.href = 'http://www.ttkdesign.nl/contentreply.html';
// --></script>
</head>
einde
</html>
#!/usr/bin/perl
print "Content-type: text/html\n\n";
use LWP::Simple;
use CGI;
chdir "/home/http/users/www.ttkdesign.nl/html/";
$filenaam = "contentreply.html";
open(F,"< $filenaam"); while (<F>) { $file.=$_ } close(F);
($begin, $eind) = split(/<!--hier eindigt de laatste reply-->/, $file);
$query = CGI::new();
$reply = $query->param("reply");
chdir "/home/http/users/www.ttkdesign.nl/html/";
open(FH, ">$filenaam");
print FH $begin;
@tijd = localtime(time);
$dag = $tijd[3];
$maand = $tijd[4]+1;
$jaar = 1900+$tijd[5];
print FH "$dag-$maand-$jaar";
print FH "<tr><TD><p>$reply</p></TD></tr>\n";
print FH "<!--hier eindigt de laatste reply-->";
print FH $eind;
close(FH);
print <<einde;
>html>
<head>
<title>Redirect</title>
<script language="JavaScript"><!--
location.href = 'http://www.ttkdesign.nl/contentreply.html';
// --></script>
</head>
einde
</html>