Need A Developer?
I am now able to accept a limited number of new clients.

Please contact me for details

Services

To see about hiring me to handle your web development needs, please use the form on the contact me page.

Although I prefer to spend my time working on more advanced/challenging PHP applications, I am more than happy to handle routine PHP development projects, as time allows. Thank you!

Spintax PHP Class

I recently needed to use a “spintax” PHP class for one of my projects. Rather than writing one from scratch, I looked up existing classes and found that Ronald Richardson had already written one that he had released as a free and open source script.

Unfortunately, it looks like his domain has expired, leaving his class unaccessible (I swiped it from Google Cache) so I am reposting the code here for others to use. Again, I had no part in developing this, it was written and released by Ronald Richardson, and is version 3.0 of his Spintax PHP class.

The following code goes in spintax.class.php

<?php
class Spintax {
	
	function spin($str, $test=false) {
		
		if (!$test) {
			
			do {
				
				$str = $this->regex($str);
				
			} while ($this->complete($str));
			
			return $str;
			
		} else {
			
			do {
				
				echo "<b>PROCESS: </b>";var_dump($str = $this->regex($str));echo "<br><br>";
				
			} while ($this->complete($str));
			
			return false;
			
		}
		
	}
	
	function regex($str) {
		
		preg_match("/{[^{}]+?}/", $str, $match);
		
		// Now spin the first captured string
		$attack = explode("|", $match[0]);
		
		$new_str = preg_replace("/[{}]/", "", $attack[rand(0,(count($attack)-1))]);
		
		$str = str_replace($match[0], $new_str, $str);
		
		return $str;
		
	}

	function complete($str) {
		
		$complete = preg_match("/{[^{}]+?}/", $str, $match);
		
		return $complete;
		
	}
	
}
?>

And to use it:

<?php
include("spintax.class.php");
$spintax = new Spintax;
// Add true to the spin functions to debug and see each line as it is spun in the process
$spintax->spin("{{Hello|Hi} my name is {Ron|Ronald}|Another random {sentence|{statement|phrase|saying}}}");
?>

Enjoy!

UPDATE: It looks like the original site is back online. You can access the original blog post, with the Spintax code at RonaldRichardson.com.

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

WordPress 3.0

WordPress 3.0 is here!

I have used WordPress for 5+ years, back when it was just a small, minor blogging platform. Back then, it was a solid, reliable platform, but now, it has grown to be one of the most commonly used CMS (content management system) software online, used by millions of sites, including this one.

True, it is, at it’s core, a blogging platform, but in recent years, it has been used more and more for other applications where static pages and/or other forms of pages rather than blog posts are required.

Rather than go through all of the new features in this latest release here on my blog, I would encourage you to view one of the many excellent write-ups available on other blogs, such as the one that SixRevisions did.

As always, it is best to keep all software fully up-to-date, so I would advise upgrading to this latest version, even if you don’t need the extra features that it offers.

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

Nettica – DNS Service

Today, I’m going to take a look a look at one of my favorite DNS management tools: Nettica.com

Most websites can simply use the default DNS / nameserver management that their domain registrar / hosting provider offers. However, for some websites where reliability and speed are crucial, a better solution is called for. In those cases, I almost always recommend Nettica as a high-performance alternative.

Although they offer other DNS-related services, the only service I have used to date would be their “basic” primary DNS service.

They don’t offer anything dramatically different from what you would get from most domain registrars, but it’s the little details that make the service worth it for me.

When you sign up for their service, you can enter a domain name into your control panel, and point it to five of their nameservers, which are geographically dispersed (four in the United States, one in London). This adds both to the speed as well as the reliability of their system.

Beyond that, they offer all of the standard DNS management tools, such as the ability to create Host (A), Mail (MX), Alias (CNAME), Text (TXT), and Service (SRV) records, as well as a few other features.

For most websites, there is no need to go with something like this, and the basic nameserver / dns management provided by your domain registrar and hosting provider will be more than sufficient. However, for those situations where uptime and speed are crucial, it might be worth it to consider going with Nettica, or a similar solution.

They have worked very well for several clients of mine with high-profile websites.

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

Other Cloud Hosting Services

Following up on my last post about Mosso / The Rackspace Cloud, I thought it might be best to mention a few of the other competing services currently on the scene.

Although they all have different feature sets and capabilities, they all share the common element of being “cloud” in nature, in that they all have at least some ability to scale over multiple machines, to grow or shrink available server resources dynamically (or, at least, somewhat easily), and are web-based.

One of the biggest companies meeting these qualifications is the Amazon Elastic Compute Cloud (Amazon EC2).

It is, as the name implies, offered by Amazon, and is one of the services offered by their AWS “suite” of products.

In their words…

Amazon EC2’s simple web service interface allows you to obtain and configure capacity with minimal friction. It provides you with complete control of your computing resources and lets you run on Amazon’s proven computing environment. Amazon EC2 reduces the time required to obtain and boot new server instances to minutes, allowing you to quickly scale capacity, both up and down, as your computing requirements change. Amazon EC2 changes the economics of computing by allowing you to pay only for capacity that you actually use. Amazon EC2 provides developers the tools to build failure resilient applications and isolate themselves from common failure scenarios.

Although they are a bit different than web hosting companies such as Mosso, there are a lot of applications that require just what they are providing, so I thought it best to mention them here.

It can also integrate easily with some of Amazon’s other services, such as their Storage service.

Another competing service is GoGrid (this one is still in Beta). While I have no personal experience with GoGrid, they look like they might be a decent service.

Yes, I know I should say something a little more profound on GoGrid. Perhaps I should sign up for an account with them for a month or two to try their service out.

3tera is another popular service. It appears that they also offer cPanel capabilities on some of their plans, something which I have often heard as a complaint against Mosso. Personally, the Mosso control panel works fine for me, but since cPanel has such a large market share, many developers often feel more comfortable using it.

Haven’t found one yet that you like? Try ElasticHosts. Based in the UK, this might be best for those with a primarily European audience, although it can certainly work just fine for sites based in the USA (or elsewhere) as well.

Finally, we come to MediaTemple, which probably comes the closest to Mosso from any of the hosting companies we’ve reviewed so far.

Personally, I have seen three websites so far hosted with them that at least partially crashed when their traffic suddenly increased dramatically.

That being said, however, this is relatively new technology, so some glitches from time to time are to be expected, and as it has been a while, perhaps they have worked out those issues by now.

Also, starting at $20/month, their hosting plans are a bit less expensive than, say, Mosso, which starts at $100/month (they both increase as you increase server usage).

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

Mosso (The Rackspace Cloud)

Although according to Wikipedia, they weren’t launched until February 19, 2008, I first heard about Mosso (now Rackspace Cloud), a cloud computing (cloud hosting) service from a friend nearly two years ago.

At the time, I was working on a big web programming project, and despite the fact that it was on a dedicated server by itself, it was still slowing the site down quite a bit because of the sheer size of the project (the number of hits/second, the size of the database, the number of database queries, etc.).

Although I ended up not using it on that project due to the fact that I needed custom software installed on the server for this project, and they weren’t supporting it, the idea behind their hosting service intrigued me.

Since then, I have used their service for multiple projects, and have always been pleased with their reliability, scalability, and support.

The concept behind their service is relatively simple:

Instead of having one website on one server (and often having hundreds of websites on a single server), have a big “network”/cloud of interconnected web hosting servers, and have all websites hosted by that “cloud” of servers.

The benefits are many, but for most users, the primary selling points are:

1. The uptime, as well as data security, is a lot higher. This is because under a usual hosting setup, if the server goes down (has a hard drive failure, or some other issue), all websites on that server instantly go offline (and under some circumstances, data can be lost as well).

With a cloud setup, everything is redundant, so if one server goes down, the other servers automatically “take up the slack”, and there is zero downtime (theoretically, at least).

2. It is a lot more scalable. If you had a website on a usual hosting setup and you suddenly got a surge of traffic to your site, your server may or may not be able to handle the increased load.

Under a cloud setup, instead of being limited to the resources of one single server, you are limited to the resources of the dozens, hundreds, or even thousands of servers on the “network”, so theoretically, your site traffic could increase 100 times overnight, and your site would load just as fast as it would otherwise.

These two features in particular have suited themselves very well for several projects I have worked on that either have a large traffic potential (and need access to a huge amount of server resources), or where reliability, uptime, and data security are critical.

While they certainly have their little issues with occasional downtime, these issues are to be expected with technology like this that is relatively new to the scene, and for my projects, this hasn’t posed an issue so far.

Mosso, which is currently in the process of rebranding themselves as “The Rackspace Cloud”, is, as the name implies, a “division” of Rackspace, which is known for their “fanatical support”.

As cloud computing seems to be the future of web hosting, the move toward cloud hosting and tighter integration with Mosso on the part of Rackspace seems to be a very business-savvy move, as more and more developers look to upgrade their hosting from the standard shared server setup.

The only big downside to small websites looking to create their own account with Mosso is that their least expensive fee runs at $100/month, and increases from there based on the server resources used.

However, for larger websites where scalability and reliability is important, it might be worth taking a look at.

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

Kohana – PHP Framework

During the course of the past few months, I have been working on and off on several projects based on the relatively new Kohana PHP Framework.

Although this framework is relatively new, it is based off a well-established PHP framework, CodeIgniter, which I have used extensively, as well as highly recommend.

Kohana, which bills itself as “a PHP 5 framework that uses the Model View Controller architectural pattern. It aims to be secure, lightweight, and easy to use.”, delivers on these claims, in my opinion.

The MVC (Model View Controller) is, in my opinion, the best solution out there for development of most web applications, as it allows developers to write “beautiful”, clean code, allows for separation of the different parts of the code to allow, for example, switching of themes (views) without any changes to the layer that interfaces with the database (model), and allows a great deal of flexibility depending on the different programming styles different developers have.

It also allows for the easy use of most popular code libraries.

For example, I routinely use the Smarty template library in both CodeIgniter and Kohana projects, as well as a wide range of other libraries for authentication, data manipulation, email management, and a wide range of other tasks.

Kohana makes it easy to use libraries that also work seamlessly with other major PHP frameworks, such as the Zend framework or CakePHP.

Since it is coming from the popular CodeIgniter framework, it is based on well-developed code that has withstood the test of multiple projects.  CodeIgniter, in the interest of maintaining support for older versions, is limited in the extent to which it can make a clean break with older technology and programming styles.

Kohana, as a form of spin-off, had an opportunity to discard those features that might hinder development of this framework in the future, as well as build a solid foundation based on the solid infrastructure that CodeIgniter had developed over the years.

One of the main differences is the fact that Kohana is built from the ground up with strict PHP 5 OOP design, which offers “visibility protection, automatic class loading, overloading, interfaces, abstracts, and singletons”, among other benefits.

PHP 5 has been on the scene for many years now, but due to requirements for backward support, many web hosts, PHP frameworks, and developers still support and use PHP 4 extensively.

While PHP 4 is a fine version of the language to use, with development of PHP 6 well under way, it seems a wise option to start phasing out support for PHP 4, in order to take advantage of the many features and benefits that the more recent versions of PHP have to offer.

Kohana also prides itself in being a very lightweight framework solution.  This is actually one of the initial reasons why I was attracted to CodeIgniter early on, as they are both lighter, faster frameworks, compared with other similar frameworks currently on the scene.

While they certainly can be set up to support large, bulky libraries where necessary, the default Kohana installation is relatively lightweight, flexible, and very easy to work with.

The fact that it is a relatively new library also means that the user base, as well as the support for the framework isn’t quite up to the level of CodeIgniter or other major frameworks.

However, for those of us who enjoy working with “new” technology and don’t mind spending some extra time debugging, this is a framework to keep in mind for future projects.

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

Protecting Privacy

A couple minutes ago, I discovered a privacy flaw on a major website.

I signed up to the Presidential Inaugural Committee opt-in form, which then redirected me to another page where they were asking for donations, with my name, email address, and zip code pre-filled.

There was nothing too unusual about that, except the URL to the page was in this format:

https://donate.pic2009.org/page/contribute/firsttoknow?stg_signup_id=xxx (where “xxx” was a number, such as “12345″).

I got curious, and decided to try the number one lower then mine as the “stg_signup_id”, and, sure enough, the form popped up, pre-populated with another persons name, zip code, and email address.

This privacy vulnerability could have been eliminated by better planning, such as putting the information in a cookie on the browser, or something like that, rather then letting them access the data directly from the database with no checking to ensure that they were the same person.

You would think that a site with that kind of exposure would have at least some basic security standards for the data from their visitors, but I suppose not.

Unfortunately, I have found that this is not necessarily all that unusual, even with major websites.

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

Free Icon Sets

As my readers are probably aware, I am definitely a programmer first, and a graphic designer second (or perhaps third or fourth).

However, in working on clients websites, I often find myself needing to pull up Photoshop or Fireworks (my tools of choice) and do some work on graphics, or perhaps spend an hour or two on a CSS file getting formatting adjusted.

Because of that, I was interested in a post by Elite by Design I found in my RSS reader this morning with links to 22 different free icon packs.

I’m always looking for shortcuts in web site development (clients generally like to see work done both fast and well), and using different free libraries such as the jQuery Javascript library or these icon packs are a very efficient way to cut development time, while actually increasing the quality of the end product.

Anyway, check them out!

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

Blog / Email Down

Rule #1 of having a freelance programming business (well, maybe not #1, but fairly high up there):

“Ensure that the domain registration on your blog/email host doesn’t expire.”

I had this domain set to not automatically renew, and unfortunately, it expired earlier this month, and it took me a few days to figure out why all of the potential clients/clients I had been emailing suddenly stopped replying to my emails.

My apologies to everyone for that glitch on my part.

I do, however, now have some time available to take on new work, so if you have a project you would like me to handle for you, please shoot me a message.

Thanks!

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

WordPress 2.6.5 Released

As many of you know, WordPress is by far my favorite blogging platform (and the one that I use for this blog).

Three days ago, WordPress 2.6.5 was released, and according to the post on WordPress.org, it contains one security fix and three bug fixes.

From their site:

The security issue is an XSS exploit discovered by Jeremias Reith that fortunately only affects IP-based virtual servers running on Apache 2.x. If you are interested only in the security fix, copy wp-includes/feed.php and wp-includes/version.php from the 2.6.5 release package.

2.6.5 contains three other small fixes in addition to the XSS fix. The first prevents accidentally saving post meta information to a revision. The second prevents XML-RPC from fetching incorrect post types. The third adds some user ID sanitization during bulk delete requests. For a list of changed files, consult the full changeset between 2.6.3 and 2.6.5.

You can download the latest package from WordPress.org/Download.

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

 Page 1 of 2  1  2 »