Add functionality to a 10 year old API using php