Crontab : Disable email notifications

By default, when you schedule a cronjob, the cron daemon will email the administrator with the results of the schedule. You can easily turn off email reporting by appending the string “>/dev/null 2>&1” (without quotes) to the end of the command. Like this : wget http://domain.com >/dev/null 2>&1 Hope this helps!

PHP: Random string with numbers and letters

I thought that some of you might find it useful to learn how to generate a random string or a random number with PHP. I wrote a quick function to use PHP to generate random. See it below : There is an easier way to do this with a single line of code but you

PHP : Strip or find a file extension

Getting a file’s extension is essential when working with uploads and other manipulations complying with files. You might have a user uploading a file and you need to rename the file before moving it from the temporary upload directory. In order to do so, you can obtain the file extension and then rename it to

WordPress Pagination Class

I wrote a simple, yet extremely useful WordPress pagination class. The class is not complete yet, and I work on it as I move along and need new features or actions. So you have the freedom to take the class and customize/expand it as you might need to. First off, you can download the class

WordPress Mailing List v2.0

The WordPress mailing list plugin v2.0 has been released to the public with a great set of new features. These features include : Multiple mailing lists Email scheduling Newsletter templates Automatic updates indicator Improved sidebar widget with Ajax Post/page opt-in form embedding Email queue CSV and MacOS Address book importing Excel CSV file exporting And

Countries SQL Code

I know that I was looking for the necessary SQL code to create a countries table, together with the necessary queries to insert all the available countries into this table, each with a unique ID key. So I decided to create it and I’m sharing it with the rest of you whom might need it.

CakePHP : Delete multiple records

With CakePHP, you can remove multiple records from a database table using the deleteAll() model method. deleteAll() Usage $this -> Model -> deleteAll($conditions, $cascade = true); Lets say that you wanted to remove all the records for a specific user from the Item model. Below is a quick example. deleteAll() Example $this -> Item ->

iTunes : Get lyrics & album artwork without an iTunes account

With iTunes, it only allows you to retrieve album artwork and lyrics with a valid account into which you are logged in. Getting an iTunes account is not a problem, but it is not supported in all countries and without being able to add your credit cart to Apple’s system, you simply cannot get these

MySQL : Check if field exists

Sometimes, you need to check if a field exists in a table and if it doesn’t, you need to add it to the table and ensure that its there. Below is a snippet which you can use a reference for checking whether a field/column exists in a MySQL database table. $tableFields = mysql_list_fields("databasename", "tablename"); $columns

WordPress : Download Older Versions

In case you might need to download an older version of WordPress than the current, latest release, you can go to the release archive and obtain any of the previous releases as needed. And then, you can view all the WordPress release changelogs to see what changes have been made in each version which has