Archive for the ‘PHP’ Category

WordPress eBook Export

This is a very very early development release of a plugin for WordPress to export a category as an eBook, currently only ePub. Some features don’t work and many are not implemented.

Anyway, use at your own risk.
Download Plugin

Git repository.

Posted January 28th, 2010 in Code, PHP, WordPress - Comments

Simple Cache Library for CodeIgniter

I wrote a simple caching library for CodeIgniter since database caching and page output caching were not suitable for my needs.

Usage:

class Test extends Controller {
 
	function main()
	{
 
		// load the library
		$this->load->library('simple_cache');
 
		// key is the name you have given to the cached data
		// will check if the item is cached
		if (!$this->simple_cache->is_cached('key'))
		{
			// not cached, do our things that need caching
			$data = array('print' => 'Hello World');
 
			// store in cache
			$this->simple_cache->cache_item('key', $data);
 
		} else {
			$data = $this->simple_cache->get_item('key');
		}
 
		$this->load->view('hello', $data);
	}
 
}

I don’t think I need to explain anymore? Maybe I will update with a better description later.

I’m releasing it under the GPLv3. Enjoy.

Download simple-cache.7z

Posted January 24th, 2010 in Code, PHP - Comments

Introduction to PHP: Installing PHP (Windows)

This tutorial will take you through the steps needed to install PHP on Microsoft Windows. I’m using Vista, but with minor changes, these instructions should also be valid for Windows XP and Windows 7 as well. Read more

Posted July 15th, 2009 in PHP, Tutorials - Comments

Introduction to PHP: Hello World + MySQL

This tutorial builds on the previous tutorial – Introduction to PHP: Hello World and as such, you should take that tutorial first if you have not already.

In this tutorial, we are going to take our previous Hello World script, and store the date in a database. We will then add the last access time to our original script. Read more

Posted June 30th, 2009 in PHP, Tutorials - Comments

Introduction to PHP: Hello World

This tutorial will introduce you to PHP with the customary Hello World script. You will be introduced to the echo language construct and the date() function. The goal of this tutorial is to show you how to output text, and display the current date.
Read more

Posted June 18th, 2009 in PHP, Tutorials - Comments

Introduction to PHP: Includes

This tutorial will introduce you to the PHP include statement, and its almost identical sibling, require.

The include statement is used to insert the contents of one file into the contents of another.
Read more

Tags: , , , , , ,

Posted June 11th, 2009 in PHP, Tutorials - Comments