Code:
#!/usr/bin/perl
# open messages
open (MSG, "messages.txt");
my @lines = <MSG>;
@lines = reverse @lines;
close (MSG);
chomp @lines;
print "Content-Type: text/html\n\n";
foreach my $line (@lines) {
my ($ip,$user,$password,$user_stripped,$cc,$rr,$his,$np,$ver,$timestamp,$msg) = split(/:::/, $line, 11);
print "<TABLE WIDTH='100%' border='0' cellpadding='0' cellspacing='0'><TR><TD><font color=$cc>[$timestamp]<b>$user says:</b>$msg<p></font><P></TD></TR></TABLE>\n\n";
}
# add a form to add a message to the file
print qq~<form name="add" action="testi.cgi">
<input type="text" name="name" value="Anonymous" size="20">Name<br>
<input type="text" name="password" size="20">Password<br>
<input type="text" size="2" value="10" name="refresh_rate">refresh<br>
<input type="text" size="2" value="10" name="histroy">histroy<br>
<input type="checkbox" checked="checked" value="1" name="nopic">nopic<br>
<input type="checkbox" checked="checked" value="1" name="verbose">verbose<br>
<td nowrap><select name="CHATCOLOR" size="1">
<option value="white" selected>white</option>
<option value="blue">blue</option>
<option value="blueviolet">blueviolet</option>
<option value="chocolate">chocolate</option>
<option value="darkgreen">darkgreen</option>
<option value="dimgray">dimgray</option>
<option value="fuchsia">fuchsia</option>
<option value="magenta">magenta</option>
<option value="maroon">maroon</option>
<option value="mediumblue">mediumblue</option>
<option value="navy">navy</option>
<option value="olive">olive</option>
<option value="orangered">orangered</option>
<option value="purple">purple</option>
<option value="scarlet">scarlet</option>
<option value="sienna">sienna</option>
</select></td>Text Color:</td><br>
<input type="text" name="msg">enter text<br>
<input type="submit" value="*Enter*">
</form>~;
##############################
# add.cgi::: #
##############################
use CGI;
my $q = new CGI;
open (MSG, ">>messages.txt");
print MSG "\n"
. $q->param('ip') . ":::" . $q->param('name') . ":::" . $q->param('password') . ":::" .$q->param('user_stripped') . ":::" . $q->param('CHATCOLOR') . ":::" . $q->param('refresh_rate') . ":::" . $q->param('histroy') . ":::" . $q->param('nopic') . ":::" . $q->param('verbose') . ":::" . time . ":::" . $q->param('msg');
close (MSG);
Code:
as passd in browser
?name=%3Cimg+src%3D+http%3A%2F%2F[URL unfurl="true"]www.freespaces.com%2Frealitygonewild%2Fwg1.jpg+align%3Dleft%3E%3Ccenter%3E%3C%2Fimg%3E%3Cbr%3E%3Ccenter%3E%3CFONT+FACE%3Dgaramond%3E%3CFONT+COLOR+%3Dsilver%3E%3CFONT+SIZE%3D4%3EWarGod+of++Venna%3Cbr%3E*Administrator*%3C%2Ffont%3E%3Cbr%3E*Never+say+Never*%3Cbr%3E%3CFONT+COLOR+%3Dsilver%3E%3CFONT+SIZE%3D4%3E%3Ca+href%3Dhttp%3A%2F%2Fwww.chatvenues.com+target%3D_window%3EChat+Venues%3C%2Fa%3E%3Cbr%3E%3Ca+href%3Dhttp%3A%2F%2Fwww.geocities.com%2Fresortofvenna%2Findex.htmltarget%3D_window%3EVenna%3C%2Fa%3E%3CFONT+COLOR+%3Dblue%3E%3CFONT+SIZE%3D3%3E%3Ccenter%3E&password=MYPASSWORD&refresh_rate=10&histroy=10&nopic=1&verbose=1&CHATCOLOR=purple&msg=Help[/URL]
as writen to file messages.txt
Code:
:::<img src= [URL unfurl="true"]http://www.freespaces.com/realitygonewild/wg1.jpg[/URL] align=left><center></img><br><center><FONT FACE=garamond><FONT COLOR =silver><FONT SIZE=4>WarGod of Venna<br>*Administrator*</font><br>*Never say Never*<br><FONT COLOR =silver><FONT SIZE=4><a href=[URL unfurl="true"]http://www.chatvenues.com[/URL] target=_window>Chat Venues</a><br><a href=[URL unfurl="true"]http://www.geocities.com/resortofvenna/index.htmltarget=_window>Venna</a><FONT[/URL] COLOR =blue><FONT SIZE=3><center>:::MYPASSWORD:::?thathtmluserstringstripped?:::purple:::10:::10:::1:::1:::1167173680:::Help
ok with each post you have to input your name, color, ect. again and again
How do I make it remember all values but $msg
being that $msg would be newly inputed each post
Do I use a getdata or ???
also I would like to uptain IP and have it print to file where $ip is
and have the html user input stripped and added in this space ?thathtmluserstringstripped?
MA WarGod
I believe if someone can think it, it can be programmed