added PHP class. Not complete yet -- just saving my work for now.