john.mcclumpha

[php] PHP speed comparison : longhand if...then vs shorthand ternary operator

Published: 1 years ago

After my recent testing of different array methods - I thought it would be good to test out another often used method - the longhand if...then statement versus the shorthand ternary option.

read more...  

[php] PHP speed comparison : array_push() vs array[]

Published: 2 yearss ago

While reworking some of my older code to help make it more portable (and OO'd) I found myself questioning whether or not to use array_push or the array[] method to add item(s) to an existing array.

read more...  

[javascript] Creating custom styled checkboxes with jQuery

Published: 2 yearss ago

I got sick of the fact that checkboxes, like several other form elements, cannot be styled using css. As a result checkboxes in various browsers always appeared differently and were often enough to ruin a nice (otherwise) clean design. As such I came up with this versatile solution:

read more...  

[linux] Build your own SMS gateway with Ubuntu Linux and Gammu

Published: 2 yearss ago

Some time ago I went down the path of building a simple sms gateway. At the time I wrote a basic blog entry but received numerous requests for a more detailed "how-to"... so here it is.

I based my solution around a basic linux (Ubuntu) server - the machine itself is nothing fancy but is more than capable of handling the sort of load it's getting. The device being used to send/receive SMS messages is an "old" Nokia mobile phone that I have since retired from use as a handset.

read more...  

[php] A solution to absolute and relative paths in PHP

Published: 2 yearss ago

When coding a dynamic site, there's often times where using relative paths is not as simple as it should be, especially when using things such as mod_rewrites to change the paths used within a URL. As a result things can often "fall to pieces". Here's an elegant PHP solution that takes all the headaches out of relative, absolute, client-side and server-side paths

read more...  

[php] PHP function for displaying relative dates in a human readable format

Published: 2 yearss ago

Here's a handy PHP function I use for comparing times and displaying the difference in a human-readable format.

The function itself returns the nearest approximate time based on the largest value from: decades, years, months, weeks, days, hours, minutes or seconds

read more...  

[php] PHP Password Functions

Published: 2 yearss ago

Here's a couple of basic password generating functions I've created which have come in quite handy.

Item 1: Basic random password generator

Item 2: L337-speak password generator

read more...  

[javascript] DHTML Effects using Javascript

Published: 2 yearss ago

With user-interaction becoming even more of a key focus in web development everyday (especially since the phrase Web 2.0 was coined), animating "objects" within a page has become much more common place.

Rather than rely on technologies such as Flash to animate items, DHTML can provide some impressive effects.

read more...  

recent posts

Follow me on Twitter
Follow me on Facebook

Have you checked out Mister Wong? Simply the best way to manage your bookmarks online:
Mister Wong