download my guestbook

note: if your site is hosted on Neocities, Nekoweb or any other host that doesn't support PHP and writing files, this guestbook code will not work. You have to use an external guestbook provider such as Atabook.
a pixely icon showing an opened book with some lines of text in it and a pencil with its tip on the signed page I first wrote this PHP guestbook in 2015, as simple as I could make it. I've been updating it ever since, with an eye on simplicity. It's almost ready to use straight out of the box; to get it working, simply place index.php and data.txt in one directory and ensure that data.txt has the right permissions: CHMOD 666.

The guestbook data is written by index.php directly to data.txt, a simple textfile, from which it also reads data to reproduce on the same page. There's a cheeky little PHP redirect involved that makes it so that refreshing the page doesn't repost the message. There's also an even cheekier little field in the form that appears 1000 pixels left of your viewport. You don't see it, but bots do, and if they put a value in that field, nothing is posted - it's primitive spam control.

Somewhere in the code, you'll find two commented out lines (preceded by //); if you uncomment those and input your email address, you'll get an email for each new message. Neat stuff.

download gbook.zip 2.9 kB, including the text of this page as a README
Thanks to Gus for catching bugs and suggesting improvements.

I hereby publish this guestbook into the public domain. Use it, adapt it, go forth and be merry, no credits required.