myNET Internet Services Z1Space 1Scripts WebCoder Z1Exchange
Recent WebCoder Blog Posts
  • Funny Facebook UsernamesFacebook launched their new username service today–now your profile can be located at http://f
  • YouTube Raided by 4chan Porn-MakersServer Error The server encountered a temporary error and could not complete your request. Please
  • Keep Track of Current Events with IceRocket[image] Ever hear the end of a news broadcast on TV and wonder “what’s that all about?&#
  • Create a Free Web Host EasilyFree web hosting is a risky business to go into–if you don’t plan right, or have a disho
  • How to Restart Windows ExplorerYesterday, I was uploading a large number of files with FileZilla. While it was uploading, I tried t
  • [view more]
    Shoutbox

    Copyright 2006-2009, myNET Internet Services
    1Book
    Flatfile based Guestbook Script
    1Book is a PHP guestbook script powered by a flatfile database. It has a CAPTCHA system to prevent spam posts, and a password protected admin area. In the admin area the site owner can edit or delete posts, ban IPs or ban usernames. The script is less than 50 KB.

    Demo

    Installing

    Unzip the "1book" folder and upload it to your website. Open guestbook.php and change the variable $adminpassword to a a new password. Change the permissions on data.php, userbans.php, and ipbans.php to 777.

    To include the script in another page, you can use an iframe as follows:

    <iframe src="/path/guestbook/guestbook.php" width="100%" height="300px"></iframe>
    

    To access the admin panel, go to /path/guestbook.php?admin=1.

    Multiple Guestbook Setup

    The script will work out of the box as a single page guestbook. However, it will also work on multiple pages.

    The data files are stored as data_blah.txt where blah is a unique identifier for the page. Create a file like this for each of your desired pages.

    To include the guestbook in multiple pages, use the iframe code above, adding a "p" parameter to the URL:

    <iframe src="/path/guestbook/guestbook.php?p=projects" width="100%" height="300px"></iframe>
    
    Replace "projects" with the name one of the names of the data files you created earlier (leaving out the data_ and file extension).

    You should now see a different guestbook on each page.

    Changelog

    • v1.0.3 (June 28 2008): Added support for multiple guestbooks
    • v1.0.2 (June 4 2008): Fixed a security problem... I wasn't thinking when I wrote the thing...
    • v1.0.1 (May 25 2008): Fixed a bug related to editing posts
    Why 1Scripts?
    All of 1Scripts's flatfile scripts are completely free to use. You can modify the scripts to match the design of your own website. If you need help, just ask in the forum.