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).

Read the rest of this entry »

List all links on a website using DOM

Have you heard of DOM before? If not it stands for Document Object Model and is a method of accessing XML or XHTML page elements (tags) and attributes, such as <book_title> in XML or <img src=”pie.jpg”> in XHTML (’src’ being the attribute).

Once you start playing with DOM you realize the massive potential it has for parsing information from webpages.


Read the rest of this entry »

RSS Feed from a MySQL Database

This tutorial will teach you how to create a simple RSS 2.0 compliant feed from a MySQL (or others with a few small changes) database.

The first thing you must do in a RSS document is to define that it is indeed an RSS feed. We do this like so…


Read the rest of this entry »

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.


Read the rest of this entry »

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.


Read the rest of this entry »

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 *


Read the rest of this entry »

PHP Function: format_filesize()

This function allows you to make user readable filesizes easily.
Example: ‘1024′ into ‘1Kb’.


Read the rest of this entry »

PHP Function: duration()

This function will turn a unix timestamp into a user readable time.
Example: 115023234 into 1 day, 25 minutes ago.


Read the rest of this entry »

File-icon plugin hack, sorted list.

Today, i installed the Wordpress File Icons Plugin (v2.0) by  Roland Rust and discovered something really annoying whilst so great at the same time.

I think the file icon plugin is a great idea, but contains 2 problems.


Read the rest of this entry »

jQuery Javascript Framework

jQuery iconRecently I tried to take my knowledge of Javascript to a new level, because, on the whole, it was pretty dire.

Whilst looking into new techniques and reading tutorials I came across some useful Javascript frameworks, specifically, jQuery, which caught my attention immediately.


Read the rest of this entry »