Blog of Clive

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

Browsing Posts tagged functions

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 = ”;   [...]

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

Here’s a useful function that I use a lot for taking a database date and converting it into something human readable. It allows custom date formats to be input for custom returns.