PHP5 & Memcached (Example)

In this example I’ll be showing you how to read and write from a memcached server using PHP5, using singleton class design and some basic static functions to connect your servers up before performing the caching. For those of you who don’t know what memcached is I have included the description from the memcached website below.

If you want to know more technical information visit the official website:

“Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.

Memcached is simple yet powerful. Its simple design promotes quick deployment, ease of development, and solves many problems facing large data caches. Its API is available for most popular languages.”

Read More

CSS3 XHTML Template

Since the implementation of CSS3 into some of the modern browsers, eg. Webkit based browsers and Firefox we’re starting to see more and more websites use CSS3 to style the pages. I have made an example of how we can use “Rounded Corners” in CSS3 in a modern layout. I have provided the download at the bottom of the page.

The layout is a standard two column layout with a header, two menus and a footer – I have rounded the corners using the CSS3 standard of border-radius and added sample dummy content to the pages. Feel free to modify and use this template as you wish.
Read More

Basic Tutorial PHP/MySQL (Part 1)

phpOne of the most requested tutorials are those that explain how to connect and use a MySQL database server with PHP code. I have written a basic tutorial showing how to perform MySQL queries with PHP.

So you’re wanting to use a database with PHP to store your data? MySQL is a great open-source RDBMS (Relational Database Management System) that is widely available on many web hosting packages. Before we start make sure that you have access to both PHP and MySQL on your hosting package.

Read More

PHPCache Release

phpI have been working on a small class to cache functions in PHP. I have come up with a class that will allow you to convert any standard function into a cached function with just one line of code. The main advantage is if you are using a Linux based server for running PHP, as I have included (by default) for the cache files to write straight to the system RAM that greatly increases performance. Check out the code below.

This is the first release of the file up to now so if you have any problems let me know.
Read More

Easy JQuery AJAX Links

jqueryThis is something pretty basic, but I thought it would come in handy for people that might want to use JQuery AJAX but doesn’t want to write a lot of code to do it. The following code will allow you to transform any normal HTML ‘a’ link into an AJAX request just by adding an extra parameter to the HTML tag.

Read More