Added PHP port of the API