Convert MySQL Timestamp into a Nicer-looking Date Format for PHP

January 11th, 2010

After spending 20 minutes searching online for a way to convert the date stored into MySQL into a human-readable format in php, I thought I would share my solution with the world.

Assuming you’re already doing a foreach or a loop to pull your MySQL variable (in this case, the ($row['timestamp']) below), use the following code:

$date = strtotime($row['timestamp']);
$date = date(’n/d/Y, g:ia’, $date);
echo $date;

Hopefully that will save sometime time.

Free Images Website

December 25th, 2009

Free Images

 

I’d like to introduce the new free images website with new images posted every day.

The images come from my own collection that I personally took. Even though it took countless hours to capture, sort, cleanup and process all of these images, I thought it would be a good thing if I share them with the world. They are all original, high-resolution, royalty-free, professional photographs free for commercial use. Visitors can subscribe to the blog’s RSS feed and get daily notifications. If traffic to the site proves to be successful, maybe someday I’ll wet my beak by adding a little Google AdSense advertising.

http://www.turbophoto.com/Free-Images/

Microsoft Live Writer for WordPress

December 13th, 2009

image

I’m actually honoring a Microsoft product in this post. I think Microsoft Writer is one of the nicer things since sliced bread. With a WYSIWYG editor, you can post images to your blog much faster. WAY faster. You just drag and drop images in the interface and when you post your new entry, it uploads and takes care of the rest. When uploaded, the images seem to retain their filename for optimization purposes and doesn’t become some id number, which is good.

Even cooler is you can do basic image editing without having to use Photoshop and optimizing for the web. So, after you drag an image into your editor, you can adjust the brightness / contrast, if the image is too dark, for example. Very nice.

The image above was added in 2 seconds, by choosing About Windows Live Writer, pressing the print screen key and pasting direct from the clipboard into this editor.

You can also edit your blog post locally, by just tweaking in the editor and clicking ‘Publish’ again. It will automatically delete the old post and will post again, assuming that’s how it works.

You can store multiple blog accounts and it will post to many blogs besides WordPress.

Posting this entry took less than 10 minutes. Microsoft did a good thing. Kudos.