Initial draft of advanced PHP client library and unit tests for API.