Author Archive
Upgrade PHP5 & MySQL 5 to latest on Debian
Sometimes the packages on your desired apt-get mirror aren’t kept up to date.
A friend recently showed me how to upgrade to the latest and securist version using a special apt-get mirror service that specializes in LAMP installations.
Installing and Configuring Samba on Debian 4
In this guide you will learn how to install Samba on Linux (Debian 4 / etch).
Installing Samba allows you to share files over the network for Mac, Windows and other Linux computers.
Javascript Function: strip_tags()
A useful function to mimic to PHP function strip_tags() to strip all HTML tags and markup from a string.
Useful when parsing client input on the fly. Extra checks should be added though.
Javascript Function: htmlentities()
Convert html tags and code to readable HTML entities. Mimics the PHP functions htmlspecialchars() and htmlentities().
Prevents from HTML script injection.
Installing Apache2, Mysql5 and PHP5 on Debian Linux
Today i decided to setup my own personal server to work from, as I’m tired of waiting the few seconds it takes to upload, reload and then almost instantly make changes to a file i’m working on. This guide will cover installing and updating Apache 2, MySQL 5 and PHP 5 on Debian Linux (5.0/etch).
PHP Function: dir_list_images()
This function will make an array of all the images in a directory, it will even include all subdirectories by default.
Again, I built this function for a friend who wanted to batch modify all the images using ImageMagick / GD2.
Javascript Function: array_search()
Was writing some javascript for a friend and developed these simple functions for searching javascript arrays.
Becomes pretty useful when your working with select html boxes and arrays in javascript.
Simple Swear/Badword Filtering tutorial
In this tutorial you’ll learn how to censor the swear words and profanity on your website.
You could even use this tutorial to prevent people making posts about your competitors.
* Contains strong language *
PHP Function: format_filesize()
This function allows you to make user readable filesizes easily.
Example: ‘1024′ into ‘1Kb’.
PHP Function: duration()
This function will turn a unix timestamp into a user readable time.
Example: 115023234 into 1 day, 25 minutes ago.
