Parsing XML using PHP: SimpleXML

Introduction

“Simplicity of character is no hindrance to the subtlety of intellect.”

- John Morley

When people ask me “What is SimpleXML?” I often quip, “XML is the solution to all your problems; SimpleXML ensures it isn’t the root of your problems!”

Those of you who have parsed XML with PHP4, or are currently dealing with XML parsing in PHP4, know that it can indeed be very painful to handle documents with any degree of complexity. You either need to use the SAX approach and write a handwritten parser for every document, or you need to use the DOM extension; which (in addition to its tendency to crash, leak and generally misbehave under heavy usage) involves the pain of processing documents using an API designed for a heavily object oriented language and

Read the rest of this entry »

How To Back Up MySQL Databases Without Interrupting MySQL

Version 1.0
Author: Falko Timme
Last edited 04/23/2007

This article describes how you can back up MySQL databases without interrupting the MySQL service. Normally, when you want to create a MySQL backup, you either have to stop MySQL or issue a read lock on your MySQL tables in order to get a correct backup; if you don’t do it this way, you can end up with an inconsistent backup. To get consistent backups without interrupting MySQL, I use a little trick: I replicate my MySQL database to a second MySQL server, and on the second MySQL server I use a cron job that creates regular backups of the replicated database.

Read the rest of this entry »

Pagination: Easy as PREV 1 2 3 NEXT (REVISED)

Pagination: Easy as PREV 1 2 3 NEXT (REVISED)

Alright. You’ve had enough, haven’t you? Pouring countless hours into trying to figure out pagination. Yep, I feel your pain. Don’t fret though, this tutorial will get you through it without too many bruises–it’s easier than you think.

For those of you who don’t know, pagination (in the Web world) is usually dividing a large list of items into several pages, and then providing a nifty link for it. You usually see pagination link displayed like this:

PREV 1 2 3 4 5 NEXT

Read the rest of this entry »

Virtual Hosting With vsftpd And PostgreSQL

Virtual Hosting With vsftpd And PostgreSQL

source: http://howtoforge.com/virtual_hosting_vsftpd_postgresql_freebsd

This document describes how to install a vsftpd server that uses virtual users from a PostgreSQL database instead of real system users. I couldn’t find any tutorial like that on the internet, so when that configuration finally worked for me, I decided to publish it. The documentation is based on FreeBSD 6.2 which I was recently forced to use (I usually use Debian). Nevertheless the document should be suitable for almost any Linux distribution as well (may require very small amendments).

OK, let’s start.

Read the rest of this entry »

Transforming XML with PHP

I have been getting requests from lots of users to post a PHP XML Parsing article. I have chosen this article from XML official website written by Bruno Pedro, You couldn’t find a better article on PHP XML Parsing than this one.

Transforming XML with PHP

This article compares two methods of transforming XML in PHP: PEAR’s XML_Transformer package and the W3C XML transformation language XSLT. I will first describe the PEAR project and its philosophy, with a focus on its XML transformation techniques. I will then give a brief introduction to XSLT and the way to use it from PHP.
Introduction

Read the rest of this entry »

How To Install VMware Server On Ubuntu 7.04 (Feisty Fawn)

This tutorial provides step-by-step instructions about how to install the free VMware Server on an Ubuntu 7.04 (Feisty Fawn) system. With VMware Server you can create and run guest operating systems (”virtual machines”) such as Linux, Windows, FreeBSD, etc. under a host operating system.

This has the benefit that you can run multiple operating systems on the same hardware which saves a lot of money, and you can move virtual machines from one VMware Server to the next one (or to a system that has the VMware Player which is also free).
Read the rest of this entry »