PHP class for REST integration