Writing A PHP Script To Send SVN Commit Changeset Email Notification

If you are a

  • PHP programmer looking to write a script to send changelog email notification when a commit is made to the SVN server
  • SVN server admin looking for a script to send changelog email notification when a commit is made

you have come to the right place.

For the impatient, the script is posted at the end of the article.

Before we delve into writing the script, let us summarize the environment.

  • We have our SVN project at the path /var/svn/myproject/
  • The project name is myproject

Exploring svnlook

Taxonomy upgrade extras: 

Making Code More Readable Using The Fluent Interface

From the Wikipedia
"In software engineering, a fluent interface (as first coined by Eric Evans and Martin Fowler) is a way of implementing an object oriented API in a way that aims to provide for more readable code."

Let us explore the fluent interface with the help of an example.

class Customer
protected $_name;
protected $_street;
protected $_city;
protected $_country;

public function setName($name)
$this->_name = $name;

Content Type: 

XML RPC Client Using PHP PEAR - A Real World Example: Ping Technorati

In a previpus blog post we discussed how to consume the Technorati ping web service using XML-RPC. The PEAR package XML_RPC2 provides convenient client and server objects. You can call the remote methods as if they were the methods of the client object.

In this post, let us accomplish the same using a PEAR package XML_RPC2. We will write a client script to update Technorati when there is new post in your blog site.

Taxonomy upgrade extras: 

Instant SVN Setup

So, you want to set up an SVN server instantly?

If you are reading this post you already know what is SVN. If you don' I recommend you to read

http://subversion.tigris.org/ and

There is also a free and excellent book on subversion at http://svnbook.red-bean.com/

In this article we will quickly set up an SVN server and also demonstrate how to use it.

First and foremost, make sure you have subversion installed on your server and client.

yum install subversion
Taxonomy upgrade extras: 

Setting Up MySQL - Database, Users And Sample Table

We discussed how to install LAMP in one of our previous articles. Some of you may be wondering how to create databases, users and tables on your newly installed MySQL server. This blog post introduces the preliminary steps to work with your new LAMP server.

We are going to learn the following:

  • Changing MySQL user password
  • Creating databases
  • Deleting databases
  • Creating MySQL user accounts
  • Deleting MySQL user accounts
  • Connecting to the MySQL server from the command line
Taxonomy upgrade extras: 

Setting Up Apache Virtual Hosts on Fedora

Apache HTTP server is capable of hosting multiple websites on the same server. The feature is popularly known as virtual host.

The term Virtual Host refers to the practice of running more than one web site (such as www.company1.com and www.company2.com) on a single machine. When you configure virtual hosts your web server runs many websites at any given instance. You don't need to edit Apache configuration file and restart Apache every time you switch to a different website.

Follow the instructions below to configure virtual hosts in Apache.

Taxonomy upgrade extras: 

10 Examples To Inspire You To Use PHP Interactive Shell

Do you want to quickly test some PHP code?

Are you learning PHP?

Are you teaching PHP?

Don't miss out the PHP CLI Interactive mode. You can invoke PHP interactive shell from the terminal

php -a

Example 1: Do you want to see the output of xmlrpc_encode_request()

php > echo xmlrpc_encode_request('myIPAddress', array('username','password'));
<?xml version="1.0" encoding="iso-8859-1"?>
Taxonomy upgrade extras: 

XML RPC Client In PHP - A Real World Example: Ping Technorati

If you are familiar with blogosphere you know what is Technorati.

Technorati is an Internet search engine for searching blogs. You can submit your blog to Technorati and ping their servers when your blog site is updated. when you ping Technorati their web crawlers read the updated information on your site.

Technorati offers an XML-RPC ping web service to allow blogs to notify content changes.

In this article we discuss how to write a PHP script to programatically ping Technorati when there is new content in your site.

Introduction To XML-RPC In PHP

Let us get familiar with some terminology.

RPC From the Wikipedia:
"Remote procedure call (RPC) is an Inter-process communication technology that allows a computer program to cause a subroutine or procedure to execute in another address space (commonly on another computer on a shared network) without the programmer explicitly coding the details for this remote interaction."

Good definition. But what exactly does it mean?

Taxonomy upgrade extras: 

XML RPC Server And Client In PHP - Determine Client's IP Address

In this article I will explain how to write an XML-RPC server and client in PHP.

To be able to understand the article, you have to have some idea about XML-RPC in general.

If you feel like gleaning more information about XML-RPC visit the following websites:


For an introduction to XML-RPC in PHP visit Introduction to XML-RPC In PHP