Welcome! What's this you may be wondering? Well, what you do is read the last sentence in the story and then enter the next one. After you submit you will be able to view the entire story so far.

$ip_log = "ip.txt";
$story = "story.txt";
$ip_address = file($ip_log);
if(file_exists("archive/1.txt")){
echo "Past Stories: |";
for($i=1; file_exists("archive/$i.txt"); $i++){
echo " $i | ";
}
echo "";
}
if($ip_address[0] == $REMOTE_ADDR){
echo "Sorry you were the last to submit a sentence. Please come back later.
";
echo "This is the story so far.
";
$story_line = file($story);
$total_lines = count($story_line);
echo "Total sentences posted: $total_lines
";
echo "| Poster | Date | The Story |
";
for($i=0; $i < $total_lines; $i++){
$line_array = explode("|::|",$story_line[$i]);
echo "| $line_array[0] | $line_array[1] | $line_array[2] |
";
}
echo "
";
echo "
";
} else {
$story_line = file($story);
$total_lines = count($story_line);
if(($total_lines+1) >= 100){ echo "THIS IS THE LAST SENTENCE, PLEASE END THE STORY!
"; }
if($total_lines == 0){ echo "
THIS IS THE FIRST SENTENCE, PLEASE START THE STORY!
"; }
$line_array = explode("|::|",$story_line[($total_lines-1)]);
if($total_lines != 0){
// prints the last line posted
echo "Please post sentence #".($total_lines+1).".
The last sentence was:
";
echo "
";
echo "Posted by $line_array[0] on $line_array[1]: $line_array[2]";
echo "
";
}
// prints out the form to submit next sentence
echo "";
}
?>
*Please no cursing and please try to keep it in a D&D/medieval/fantasy setting.