Word morph game

I came across this interview question recently:

Given two words of equal length that are in a dictionary, write a method to transform one word into another word by changing only one letter at a time. The new word you get in each step must be in the dictionary.

I thought it was a neat problem and was bored enough to code a web version of this. Check it out at

http://106.187.92.122/word_morph

The PHP script calls an external C++ program, which can be viewed here:

http://106.187.92.122/word_morph/word_morph.cpp