Generate secure URL token in PHP with a simple class

I often have to look back at previous projects that I’ve done to generate a quick token that is URL friendly so I can issue out email links with some encrypted data in them. There are plenty of crypto nerds out there that will get super crazy with their techniques and I totally support them…. Read more »

Incredibly simple WordPress session handler

Here’s a super simple session handler for WordPress. This only initializes the session (starts and stops as needed). You’ll want to add things to the $_SESSION array to your liking. Add this to functions.php:

As you can see, this has ZERO bells or whistles and is intended for the programmer to use sessions as they… Read more »

Resize images with PHP on file upload using ImageMagick to dynamically generate thumbnails and different image sizes

This is an example of a function I wrote for a client to handle image uploads and dynamically resize the original image to 500×500 and generate different image sizes (thumbnails, etc.) with PHP using ImageMagick. If you don’t have have ImageMagick installed, or are unsure if you do, you’ll want to install it first. If… Read more »

jQuery method to force numeric input on element with cmd and ctrl actions to allow select all and page refresh

This is just a simple jQuery method to force numeric input on an <input> element. It allows backspace, tab, delete, arrow keys, numbers, numpad numbers, home, end, period, and CMD or CTRL key combinations for select all, copy, paste, etc. It took awhile to figure out all of these character code exceptions and combine them… Read more »