PHP
Benchmark your PHP code
As a developer I often question myself when I have many occurrences of a function that could be replaced by something else. There are often many ways of achieving the same thing and only opinion standing in the way of a decision.
To solve this problem, I often benchmark certain peices of code multiple times to [...]
PHP Function: str_remove()
Thought it’d be useful and make more sense to make a str_remove() function because there isn’t one.
SHARETHIS.addEntry({ title: “PHP Function: str_remove()”, url: “http://www.arkinex.com/php/functions/31/php-function-str_remove/” });
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 [...]
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…
SHARETHIS.addEntry({ title: “RSS Feed from a MySQL [...]
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.
SHARETHIS.addEntry({ title: “PHP Function: dir_list_images()”, url: “http://www.arkinex.com/php/functions/17/php-function-dir_list_images/” });
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 *
SHARETHIS.addEntry({ title: “Simple Swear/Badword Filtering tutorial”, url: “http://www.arkinex.com/php/tutorials/15/simple-swear-filter-tutorial/” });
PHP Function: format_filesize()
This function allows you to make user readable filesizes easily.
Example: ‘1024′ into ‘1Kb’.
SHARETHIS.addEntry({ title: “PHP Function: format_filesize()”, url: “http://www.arkinex.com/php/functions/14/format_filesize-to-get-user-readable-file-sizes/” });
PHP Function: duration()
This function will turn a unix timestamp into a user readable time.
Example: 115023234 into 1 day, 25 minutes ago.
SHARETHIS.addEntry({ title: “PHP Function: duration()”, url: “http://www.arkinex.com/php/functions/13/php-function-duration/” });
Advanced Navigation II using Clean Urls
This tutorial will teach you how to implement clean SEO friendly web URLs.
Example: Turning /index.php?page=register into http://www.domain.com/register/.
SHARETHIS.addEntry({ title: “Advanced Navigation II using Clean Urls”, url: “http://www.arkinex.com/php/tutorials/8/navigation-using-clean-urls-htaccess/” });
PHP Function: config_load()
A very basic configuration file (ini style) parser for PHP 4 & 5.
It is all easily saved to a variable.
SHARETHIS.addEntry({ title: “PHP Function: config_load()”, url: “http://www.arkinex.com/php/functions/6/config-parser-small/” });
