Blog of Clive

PHP, MySQL, jQuery code, ideas and general developer crap

Recently I’ve been setting up Debian Linux on a Dell Inspiron 1501 that I’ve had lying around refusing to load windows. While the install and setup procedure has been quite easy, I have found that the wireless device doesn’t want to work. This is a bit of a problem as I don’t want to be [...]

Emailology – The Science of Looking Good in the Inbox. While catching up on some rss feeds today this little gem popped into my window. It contains a boilerplate for HTML emails in loads of email programs. The compressed mode which is 109 lines of code.     The site also contains faq about common [...]

This function outputs a string that is filename friendly. It removes all non-characters and punctuation from the input and converts to lowercase. I find this useful for seo friendly cms pages. This function is still being tweaked so any improvements would be most appreciated. function checkCharacters($title) {         $final_text = ”;   [...]

Here’s an old bit of code that I found to position something centrally inside an element.

Now that Google+ buttons have been out for ages, I’ve finally got them added to my posts. That’s all for this post, just thought I’d make people aware!

This function is great for retrieving the last key of a multidimensional array. I use this function on a site that stores cake options such as size, shape, ribbon colour, icing colour and text fields for use in a shopping basket. Not all cakes have all the options so i need to know where the end of the array is, hence this function.

Following on from my other 2 useful functions I thought I would show you another one which I have found useful for determining if a colour background needs a white or black text colour over the top. I found this function a while back so can’t take the credit for writing it myself, I have [...]

Following from my last post, here is the method to get your IP address if you are behind a proxy. It’s a much better function than the earlier post as it will almost guarantee a return result.

Here’s a quick little function which can be used to return your IP address. Not as useful as the next method but a simple quick solution

I had an interesting experience the other day where an application window appeared off screen and therefore hindered my progress on a website build. I put this down to the fact that I run two monitors on my work machine and since moving them, I must have put them the opposite way around. This had [...]