November 28, 2006

PHP guestbook for

Filed under: PHP,Programming,T3city — pj @ 12:20 am

When T3city took over the hosting for, they had a guestbook on their web site. Their old host used what appeared to be a custom guestbook written in Cold Fusion. We don’t support Cold Fusion and I figured I could find something better in PHP, anyway. I found and installed the Purple Yin Guestbook. The PYG script worked well for some time. At some point, though, their guestbook (and guestbooks all over the Internet) got hit by bots (autonomous programs) created by spammers to post in guestbooks. Because the posts were automated, there were many of them. Eventually,’s owner, Gary, called and we discussed the spam problem. I decided to upgrade to the latest version of PYG. This new version supported captcha images. Gary asked to only use one random digit for the captcha image. This stopped the spam right away. Unfortunately, there were a lot of spam entries to clean up, but Gary worked on this as time allowed.

A couple of weeks ago, Gary started having more problems with his guestbook. It was slow and, more importantly, it wasn’t taking new posts. After some digging around, I found out that it was slow because PYG stored all the entries in a simple text file. THis is OK (and maybe ideal) for a guestbook with a few posts. Gary’s guestbook is active and covers several years. Also, there were still a fair number of spam posts that were not visible (Gary’s guestbook is moderated), but still in the text file. Altogether, Gary has over 3000 posts in his guestbook. (more…)

Powered by Teztech