'; echo 'niceopod\'s guestbook'; echo 'The guestbook on isopod.cool'; echo 'en-us'; echo 'https://isopod.cool/guestbook/'; echo 'My crappy PHP code'; $postlist = json_decode(file_get_contents("posts.json")); $index = 1; $totaloutput = ""; foreach($postlist as $post) { $output = ""; $date = date("D, d M Y H:m:s", $post->date) . " GMT"; $name = $post->name; $message = $post->message; $found = $post->found; $website = $post->website; $cool = $post->cool; $coolsanitized = htmlentities(preg_replace("/https?:\/\//i", "", $cool)); $reply = htmlentities($post->reply); if($website) { $output = $output."$name:

"; } else { $output = $output.$name.":

"; } if($cool) { $output = $output."cool thing: $coolsanitized

"; } if($found) { $output = $output."How did you find me?
$found

"; } $output = $output.$message."

"; if($reply) { $output = $output."
Reply:
$reply"; } $totaloutput = "Entry #" . $index . " - " . $name . "https://isopod.cool/guestbook/" . $date . "".htmlentities($output)."" . $index . $post->date . $name . "".$totaloutput; $index++; } echo $totaloutput; echo "
";