This commit is contained in:
awesomeuser 2023-08-02 22:12:08 +00:00
parent 6df58cb06c
commit f50b2817e3

View file

@ -4,12 +4,12 @@
<body onload="window.location.href = 'https://furp.colean.cc';"> <body onload="window.location.href = 'https://furp.colean.cc';">
<?php <?php
// write new post to file only if necessary
if (!is_null($_POST["body"]) && strlen($_POST["body"]) != 0) {
$myfile = fopen("posts.txt", "r") or die("Unable to open file!"); $myfile = fopen("posts.txt", "r") or die("Unable to open file!");
$content = fread($myfile, filesize("posts.txt")); $content = fread($myfile, filesize("posts.txt"));
fclose($myfile); fclose($myfile);
// write new post to file if necessary
if (!is_null($_POST["body"]) && strlen($_POST["body"]) != 0) {
// concatenate new post to the beginning of the string // concatenate new post to the beginning of the string
$signature = "anonymous"; $signature = "anonymous";
if (!is_null($_POST["signature"]) && strlen($_POST["signature"]) != 0) { if (!is_null($_POST["signature"]) && strlen($_POST["signature"]) != 0) {