Archive for February, 2006
It has become apparent that spammers are getting even smarter than we take them for. Rather than abuse open relays, which are almost non-existent, these scum-of-the-earth 'traders' are now abusing contact forms.
However, the problem isn't necessarily that they are attempting to use the contact forms. The problem that exists is that the average coder with little or no understanding of security issues can create a contact form for their website which can act as an open invitation to spammers.
The Problem
Lets take a quick look at a sample of code:
Continue Reading February 24th, 2006
Over time, there comes a point where you have to make certain choices as a DBA in order to maintain the integrity and efficiency of your database system. In a fair amount of systems, there is information that needs to be archived away, possibly compressed, and then used to do a few lookups on when needed.
In the past, you could compress MyISAM tables, however, this required you to take your MySQL server offline to perform the compression. However, starting with MySQL 4.1.3, there is the new ARCHIVE engine. You can find out if your MySQL distribution support the ARCHIVE format by running the following query:
February 16th, 2006
I recently heard about someone who used to store dates in their DB, retrieve them, and then use mktime(), date() etc to then use that date in a more readable format! So here's a quick look into some of the ways to retrieve dates from MySQL and format them.
Timestamps are your Friend
The UNIX timestamp is a count of the number of seconds since 1st January 1970. The date() function in PHP can format a UNIX timestamp into a large number of user-defineable formats:
Continue Reading February 13th, 2006
One of the talks whilst I was at the UK PHP Conference was on AJAX, and its downfalls. The talk was done by Harry Fuecks, someone whose opinion is respected within the online community. I've always been a bit wary of 'new' technologies when they surface, and the mad rush to implement them as they are 'cool'. Ajax is not exceptionally new. Internet Explorer was the first browser to implement the XMLHttpRequest protocol as an ActiveX object, way back in IE 5 circa 1999. However, its only been the recent use by certain big sites such a Google and Amazon that have made it more mainstream in the rush to implement it.
Continue Reading February 11th, 2006