I wrote about rolling your own server logs awhile back, but it only occurred to me while at the GDC that by updating the .htaccess file I can redirect 404 errors to my own PHP document that will display the 404 error and also log when misdirections occur at my site (since the requested document is in the GET request). Read the rest of this entry ...

§67 · March 14, 2005 · PHP, Software, Technology, Tips, Web · Comments Off on Rolling Your Own Server Logs (Part Two) ·


Let's say you're cheap or you can't afford a fixed IP address and let's say you also want to be able to access your Linux box from the internet but you don't want to have to constantly know the IP address of that box.

Well, if you have your own website (that supports PHP scripting), you can still get around this. Check out this article that I just wrote on how to work around this using some PHP, some Apache mod-rewrite and a simple cronjob.

§45 · February 16, 2005 · PHP, Software, Technology, Tips, Web · 1 comment ·


After getting bombed with some comment spam yesterday (over 15 of them in various blog entries), I decided I wanted some extra security, but I didn't want to have to approve every comment (especially when the majority of them were spam). So I thought I'd dig into some PHP again and design my own Captcha.

This little project proved to be more challenging than I thought it would be, the easiest part was generating the unique and random image every time, the hardest part was figuring out how to make sure the image was not reused again (even if the user clicks the "Back" button on his browser). While I won't get into the details right here and now, suffice to say that it works completely now and I can now work on making the image even more difficult for a computer to read in the future...if anyone wants it let me know (leave a comment, heh) and I'll post a subsequent entry about some of the details and put the source up.

Anyway, I hope it's not too annoying to those who wish to leave comments...

§34 · February 5, 2005 · PHP, Software, Technology, Web · Comments Off on Craptcha! ·


A couple days ago, when I finally got around to installing Linux and configuring my old PC as a 24x7 server, I had the notion that I'd like to make daily (or at least weekly) backups of the databases behind my websites (my forum and my blog primarily). The MySQL databases are provided by my hosting company (GoDaddy.com). However, when I sent an email to them asking why I couldn't seem to connect a local mysqldump to the database servers they responded stating it was not allowed since it was a security risk and put unknown load upon their servers. Being the type of guy I am, I decided to do something about that. Read the rest of this entry ...

§31 · February 2, 2005 · PHP, Software, Technology, Tips, Web · 5 comments ·


Every guy with a webpage eventually gets really curious about who is reading his website and whether he's doing anything worthwhile or if he's just entertaining himself. Serious webmasters will ensure they get server logs so they can analyze their traffic thoroughly. The web package that I purchased through my host gives me some standard web site statistics (produced by Report Magic) and these reports are great as summary information. But if I want to look at my actual server logs I'm out of luck unless I want to pay an extra couple bucks a month for them.

Ok, so I'm cheap. Instead of doing that, I thought I'd brush off my PHP manual and figure out how to do it myself. It wasn't that hard to do. Consider that it only took a couple hours time, I wasn't testing it locally (had to FTP every time), and my PHP knowledge is maybe just a notch above novice (though my familiarity with C/C++ certainly helps). Read the rest of this entry ...

§27 · January 27, 2005 · PHP, Software, Technology, Tips, Web · 1 comment ·