|
Saturday, 16 June 2007
One of our readers recently observed that we don’t seem to be using any images to draw our barcharts and wondered how it was done.
Read more >>
Tuesday, 5 June 2007
We’ve seen plenty of PHP scripts that rely on the $_SERVER['REMOTE_ADDR'] variable when trying to establish the IP address of the client computer. The problem with this approach is that if your visitor is behind a corporate firewall or proxy, then the above will actually be the IP of the firewall or proxy, not the visitors computer.
Read more >>
Thursday, 31 May 2007
You don’t need to muck around with JavaScript, page redirection or PDF integration just to make your XHTML web pages printer friendly.
Read more >>
Tuesday, 15 May 2007
Here’s the easiest way to output the last day of any month using PHP:
function lastday($month = '', $year = '') {
if (empty($month)) {
$month = date('m');
}
if (empty($year)) {
$year = date('Y');
}
$result = strtotime("{$year}-{$month}-01");
$result = strtotime('-1 second', strtotime('+1 month', $result));
return date('Y-m-d', $result);
}
We found it useful for reporting purposes when filtering data purely for the “current” month but by specifying the month and year arguments, you can use it for any month of any year.
Please note that the output is in IS0 8601 international date format. If you need anything else, modify the last line to suit.
Wednesday, 9 May 2007
Peggy Duncan over at Fastpitch writes about email pet peeves that cause stress in the workplace. If you found our post on email etiquette a little disdainful, have a read of Peggy’s article.
|