Archive for the ‘Web Site Dev’ Category

Resolving transaction concurrency issues in a PHP+MySQL multi-user environment

Here’s how I’m implementing my solution to the lost update concurrency issue by comparing timestamps generated when a record is saved and accessed.

Read more...

How to Geolocate Visitors Using an IP-to-Country Database

In this post, I’ll illustrate how to use the IP-to-Country database available from http://ip-to-country.webhosting.info/ to identify the real-world geographic location of visitors to a web page (geolocate) based on their IP addresses. Once you know where a visitor is physically located, you can do all sorts of nifty things, such as send them location-aware content [...]

Read more...

Using timestamps to reduce WordPress comment spam

The method described in this post uses PHP to generate the timestamps. If your site is using a caching plugin, the timestamps will be stale, and this method will not work. I’m working on a new method using JavaScript for sites that use page caching. In this post, I’ll explain how to reduce the amount [...]

Read more...

A collection of PHP code snippets

This is a collection of php code snippets that seem to come in handy rather often. They are assembled here more for my own organization than anything else.

Read more...

500 error with GoDaddy’s form mail

I was getting a 500 error when trying to submit a form mail from my web site via GoDaddy’s gdform.cgi. I turned on error logging and this is what showed up: SoftException in Application.cpp:624: Could not execute script “/home/content/a/r/d/ardamis/html/cgi/gdform.cgi” Caused by SystemException in API_Linux.cpp:430: execve() for program “/home/content/a/r/d/ardamis/html/cgi/gdform.cgi” failed: Permission denied [Sun Dec 2 01:34:05 [...]

Read more...

Defeating WordPress comment spam

How to reduce WordPress comment spam by implementing a challenge-response system that uses JavaScript to hide the path to the form processing script.

Read more...

Plogger 3 theme: Broadway

A dark Plogger theme that takes elements from the Yahoo! Broadway page of 2007.

Read more...

Correcting for line descent in Firefox

A fix for the CSS space below images that are wrapped in anchor tags.

Read more...

Centering the thumbnails in Plogger

This post illustrates a method of centering the thumbnails in the album view of the PHP image gallery Plogger. The method automatically adjusts for thumbnails of varying widths and pages containing less than a full row of images. This method is implemented in the Plogger 3 theme: Air, but it should work in any theme [...]

Read more...

Defeating contact form spam by hiding the webmail script

How to defeat contact form spam bots through the use of a challenge-response system.

Read more...