Web Hosting Talk







View Full Version : Is Plesk (or cpanel,hpanel,etc) scriptable?


mattr0
04-11-2002, 05:24 AM
Okay, this is my first post so here goes. I was wondering whether Plesk, or any of the other major control panels that hosters/resellers tend to use, allow programmatic control. What I mean is, do they have a programmable API, or allow control from scripting languages like PHP? What I want to do is automate various tasks. For instance, if I get a new user and want to provide him with email, as far as I can see I'd have to go through the web interface and do it manually. Is anyone aware of a non-manual way to do this with any of the control panels (Plesk in particular)?

Thanks,
Matt :)

avara
04-11-2002, 07:08 AM
I don't know about Plesk and Ensim, but CPanel does have a limited API which allows you to do things like set up new accounts.

manmythlgnd
04-11-2002, 11:51 AM
Plesk is scriptable. I am finding that with the aid of the creation utilities (ask your salesperson for them -- the scripts for 2.5 are not online apparently) you can pretty much script around their admin interface and eliminate it. For many running FreeBSD this is a good thing as you are not stuck with their uncustomizable interface and your alternative isn't to just run H-Sphere and pay out the a**.

rey
04-11-2002, 01:44 PM
I am finding that with the aid of the creation utilities (ask your salesperson for them -- the scripts for 2.5 are not online apparently) you can pretty much script around their admin interface and eliminate it. But, don't you still have to execute the script manually though? :)

jw
04-11-2002, 04:28 PM
The solution to that is to have the script import the data into a mysql database, then have a script run from cron via the root user to create the accounts automatically.

mattr0
04-11-2002, 05:40 PM
Thanks. I guess I forgot to mention that I want to do this as the domain owner, not the administrator. As the domain owner, do I have access to the mySQL tables, and will these scripts that are provided by my hosting company's salesman actually work, or would I have to be an administrator? Primarily I want to be able to set up email forwarding for all of my users automatically. I was considering doing this manually on a dedicated host, but it is so much cheaper to go with shared hosting, if I can surmount the control panel interface problems I would much rather go with that.

One alternative I may have to do (though would prefer not to) would be to have the script directly interact with the web interface as if it were me the web user. This could get ugly (dealing with login, cookies, POSTing, etc..) and wouldn't be very dependable (what if interface slightly changes on an upgrade), so I'm hoping there are other ways.

Thanks,
Matt

manmythlgnd
04-12-2002, 08:54 AM
Originally posted by rey
But, don't you still have to execute the script manually though? :)

If you are in a rush, that is the easiest thing to do but thankfully they do not used that damn zend encoder crap on the creation utility scripts, so you can hack away at it.