
Code: Alles auswählen
<?php
DEFINE ("TEXTDATEI", "ftp://beispiel.bplaced.net/darkfile.txt");
DEFINE ("HEUTE", date("m.d.y"));
echo '<form method="post" action="index.php">';
echo '<table cellpadding="5" cellspacing="5" width="100%" border="0">';
echo '<tr><td colspan="3"><b>darkchat webbox</b></td></tr>';
echo '<tr><td valign="top"></td><td><textarea name="comment" rows="5" cols="58"></textarea></td><td></td></tr>';
echo '<tr><td></td><td><input type="submit" name="submit" value=" send "></td><td></td></tr>';
echo '</form>';
if (file_exists(TEXTDATEI)) {
$handle = fopen(TEXTDATEI, "r");
fwrite($file,( $_POST['textarea'] ) );
$content = fread($handle, filesize(TEXTDATEI));
echo '<tr><td colspan="3">' . $content . '</td></tr>';
fclose ($handle);
}
?>