1) Does anyone have a working example that allows you to login to the WebFaction API using PHP with some XML-RPC library (Zend XmlRpc Client or ...)? The WebFaction API documentation only has Python scripts, and depend on a Pyton library (xmlrpclib). 2) Alternatively, is the XML-part of the XML-RPC request documented somewhere? (the raw XML used for the XML-RPC request, without the Python method call)? Something along those lines: #
asked 23 Dec '12, 11:36 klor |
Our API tutorials and examples use Python, but the WebFaction API reference is language-neutral. If you want to use phpxmlrpc, you simply create a XML-RPC client instance and send messages to it. Here's a simple example that logs in, lists your domains, and creates a new app, dumping the results to the screen along the way:
There may be less-verbose ways to do the same thing with phpxmlrpc, but I don't have much experience with it. This should be enough to illustrate the core concepts. Hope that helps! answered 24 Dec '12, 18:46 seanf |
If you use Laravel, then I have a fresh package for reaching the API with php. https://github.com/subdesign/laravel-webfaction answered 13 Jul '18, 06:55 sub |