15 lines
427 B
PHP
15 lines
427 B
PHP
<?php
|
|
$message_file = fopen("messages.csv", "r");
|
|
while (($messages = fgetcsv($message_file)) !== FALSE) {
|
|
if ($messages[0] == "") {
|
|
$userName = "anon";
|
|
} else {
|
|
$userName = $messages[0];
|
|
}
|
|
echo("<p style='color: red;'>" . $userName . " says:</p><p>" . $messages[1] . "</p><p style='color: red;'>At: " . $messages[2] . "</p><hr>");
|
|
}
|
|
?>
|
|
<script>
|
|
window.scrollTo(0,document.body.scrollHeight);
|
|
</script>
|
|
<?php return; ?>
|