PHP: WonkyMail class for sending email.

Posted on January 10, 2012 by Jimmy K. in Projects, Tutorials.

This class has been four years in the making. It started as a very simple script when someone asked me to create a way to send email messages between users on their website. Over time, more features were added until it ultimately became what it is today. This class presently supports multiple file attachments, multiple [...]

 

PHP: Calculate a person’s (or… your cat’s?) age.

Posted on January 9, 2012 by Jimmy K. in Tutorials.

Sometimes you’ll need to calculate an age. It could be the age of a member on your website… It could be your cat. Either way, this can be useful for a variety of reasons such as personalized messages, criteria-based marketing or any functionality that is based on age demographics. I’ve used a few different versions [...]

 

PHP: Implode an array into a readable format.

Posted on January 9, 2012 by Jimmy K. in Tutorials.

I was recently asked to write a function that implodes a list of items in an array into a human-readable list. For example, [[0] => “Jimmy”, [1] => “Ryan”, [2] => “Ken”, [3] => “Barbie”] would become “Jimmy, Ryan, Ken and Barbie” and [[0] => “apple”, [1] => “banana”] would become “apple and banana”. This [...]

 

PHP: Validate an email address with regex.

Posted on January 9, 2012 by Jimmy K. in Tutorials.

Email addresses are used for everything. Registrations, usernames, lead generation… Everything. They are as unique as a telephone number or physical address and require validation just like any other piece of data. I’ve come across a lot of poorly written email validation scripts, but this one has risen from the ashes in a blazing glory [...]

 

PHP: Auto-hyperlink URLs with regex.

Posted on January 9, 2012 by Jimmy K. in Tutorials.

Have you ever typed a URL into an email or website and a clickable hyperlink was automagically created? Regular expressions, baby! Check it out: This function accepts three arguments; $sInput, $sTarget (optional), and $sClassName (optional). $sInput is the text you would like to search and create hyperlinks for, $sTarget is the target window that hyperlinks [...]

 

PHP: How to truncate characters and words…

Posted on January 9, 2012 by Jimmy K. in Tutorials.

Sometimes you just need to shorten that huge wall of text. Here are two functions that I use frequently to limit the display of lengthy user input: The first function, jTruncate(), truncates text if it is greater than the specified number of characters. For example, if you pass “This is a large block of text!” [...]

 

Game Review: Red Faction Armageddon for PC

Posted on December 13, 2011 by Jimmy K. in Gaming.

I was at a LAN party last weekend and one of my friends walked in wearing a shirt that bore a striking resemblance to the original Red Faction logo. After seeing his shirt, I was immediately jonesing for some nostalgic Red Faction blow-up-everything-in-sight first person shooter action. So naturally I got my hands on Red [...]

 

Healing as a Holy Priest in WoW

Posted on November 30, 2011 by Jimmy K. in Gaming.

Healing as a Holy Priest in WoW is awesome. There, I said it. While I personally believe healing in WoW to be easy and a lot of fun, I frequently meet players that are hesitant to take on the responsibility of playing a healer. This article includes a few scenarios, my preferred key bindings, some [...]

 

Game Review: Vanquish for XBox 360

Posted on November 27, 2011 by Jimmy K. in Gaming.

This game sat on my coffee table for literally four months before I even took it out of the box. I didn’t even buy this game – it was the last item I picked when redeeming my Chase Visa Rewards. However, when choosing between a new hand mixer and Vanquish, I’m pretty glad I chose [...]

 

Guess what? I updated my blog! (Again!)

Posted on November 26, 2011 by Jimmy K. in News.

Yep. I’ve done it again. Much like my previous blog post, I’ve completely cleaned and rewritten every nook and cranny of my entire blog. Over the last seven months, I’ve learned a lot of new programming techniques and I’ve been jonesing to try them out. Short of a handful of work projects, I haven’t really [...]

 

PHP: Recursive Cleanup (for Web Servers)

Posted on October 4, 2011 by Jimmy K. in Articles, Tutorials.

For as long as I can remember, I’ve loathed .DS_Store and Thumbs.db files. They always seem to crawl their way onto my hosting servers. By definition, the .DS_Store file is “a hidden file created by Apple’s Mac OS X operating system to store custom attributes of a folder such as the position of icons or [...]

 

PHP: MySQLGoodies class has been updated!

Posted on September 16, 2011 by Jimmy K. in Articles, Tutorials.

I’ve recently started programming an international traveling website that accepts input from users all over the world. Since it’s likely that users will type in their native language, the functionality to accept accented characters became an absolute necessity. I’ve recently incorporated some of this new functionality into the MySQLGoodies class for PHP. This class is [...]

 

WoW Raiding: My UI Addons

Posted on May 25, 2011 by Jimmy K. in Gaming.

I hate the default WoW user interface. There, I said it. It has too much crap floating around and it absolutely drives me nuts. As some of you may know, I raid with a guild on Uldaman-US called Fire Swamp Survivors. If you’re serious about raiding (aka you want to make intelligent decisions), then you [...]

 

How fast do your WordPress pages load?

Posted on May 21, 2011 by Jimmy K. in Articles, Tutorials.

This page was loaded in 0.1183 seconds! Go ahead, refresh this page and the load time value you just read will change. This is possible because I wrote a WordPress plugin that calculates the time it takes to load a page from start to finish. This is the first plugin I have ever created for [...]

 

Protect yourself online with PeerBlock.

Posted on May 18, 2011 by Jimmy K. in Articles, Resources.

The Internet contains an unlimited number of websites and pages. While most websites are harmless and their primary focus is to share information, some websites are malicious and will stop at nothing to acquire your personal information or cause harm to your computer. These websites actively spread viruses and malicious programs in an attempt to [...]