Submit REST requests from PHP