Hi there everyone.
I have started a personal project to develop and maintain a small framework that will provide Remote API features from a PHP script.
So far I haven't gotten very far, but I am looking for feedback/contributions/enhancements as the project develops. What I have gotten so far can be found on Google Code:
http://code.google.com/p/virtualmin-php-api/
If you browse the source, you will see a demo/ directory. In there is a small demonstration script that shows the basic usage of the framework.
So far there are two method available: - createDomain(): Which, as you can imagine, can be used to create domains on your virtualmin server. - listDomains(): This method returns the STDOUT that the program returns. This will be rewritten to either return and array of domains/sub-domains or an object that represents a domain. (It will start out as an array and develop into an object as the framework expands, I hope).
I have followed the coding styles of Zend/PEAR/Doctrine and will continue to, so if you DO contribute, then be nice and please save me the hassle of having to reformat your code :)
PLEASE DO NOT TEST THIS ON A LIVE VIRTUALMIN SERVER. I CANNOT BE HELD RESPONSIBLE FOR ANY PROBLEMS IT MAY CAUSE.
If you do feel like testing it/helping out then install VirtualBox and create a virtual machine running a (supported) flavour of linux and virtualmin.
I will keep this post updated with all activity and changes. Feel free to keep tabs on me :)
I hope you will all find this useful at some stage.
Thanks Ashley
Looks promising!
Perhaps I'll use this within my cluster manager ;-)
http://www.virtualmin.com/node/12860
-Peter
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
hi,
I need a php class to use the api of Virtualmin, I wanted to know if your project is still under development and if I could help you develop it? do you have a beta or release?
RĂ©gis www.dolibarr.fr
*** Please disregard the message below, as I misread the posting and who it was intended for. ***
Regis,
The project is still being developed, however no beta release has been reached yet.
Due to time constraints, I've had to temporarily delay any further updates to it, as I'm working on a bunch of freelance jobs which helps pay the bills right now.
I'm also focusing on my first layer called "tpnCP" in order to get acquainted with all the available API options, and make use of them in a more "user-friendly" control panel with a few additional features (ex. billing, support, etc)
A lot of "tpnCM" is still being sketched out, in order to make managing a cluster super easy, and make sure all the Virtualmin servers play nice. Also working on resolving a few issues with implementing this type of solution with Virtualmin, which I know I'll figure out, but certainly has slowed down development while I iron them out.
*** tpnCM is my "cluster manager" and "tpnCP" is my end-user "control panel". The two go side-by-side and compliment each other, along side Virtualmin which is the heart of the whole system, and still used to do much of the heavy lifting behind the scenes. ***
As for taking on help, while I appreciate the offer, I'm currently doing this alone since it allows me to keep my coding nice and tidy. The first release will be used within my own eco-system, and may also include some special features for my environment specifically, while a general release will follow once I've standardized many of the features.
Ideas and suggestions however, are always welcome, and while I'm not taking on any extra developers to do the coding, you can always drop me a line. I enjoy collaborating on ideas with people, while I would rather remain the only coder for the moment.
You can email me at: pknowles@tpnsolutions.com which is also my username across "AIM/MSN/Google Talk".
-Peter
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
I'm interested in figuring out (quickly) how to create a new server in PHP.
Looks like the google code project has little activity.
Does anyone know the command to create a new domain? The Documentation for the command line API is down...
Hmm, the command line and remote API documentation links both seem to be working for me... do you get some sort of error when browsing to them? They should be available here:
http://www.virtualmin.com/documentation/developer/cli
http://www.virtualmin.com/documentation/developer/http
Note that with the command line API, you'd need to run it as root for it to work... so if you're using PHP from a web-based application, you'd probably want to look at the second link there, the remote API.
There's a few examples listed in the docs there.
-Eric