avocado
04-16-2009, 02:36 PM
Is there an easy way to set up a bunch of new parked domains at once using WHM / Cpanel? I have a client who wants to move the DNS for and park about 200 domains on an existing account and domain, and it seems ridiculous to do one at a time.
ServerManagement
04-16-2009, 06:12 PM
Unfortunately there's no option in whm to park multiple domains at once. You can make a small script to automate it though.
avocado
04-16-2009, 06:20 PM
Ah. Does WHM have an API or something for this stuff?
Thanks!
semoweb
04-16-2009, 07:20 PM
Im sorry you will have to do this 1 at a time and if im correct there is no API you can use that WHM provides I apologize for any inconvience.
ServerManagement
04-17-2009, 10:58 AM
There is an API for WHM, you can check out the documentation on the Cpanel site for instructions.
cPanelDavidG
04-17-2009, 01:30 PM
Ah. Does WHM have an API or something for this stuff?
Thanks!
Yes. Just call the following API1 code from our XML API (where example.com is the domain you wish to park):
Park=park(example.com)
Details on how to do this is available in our documentation available at:
http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/CallingAPIFunctions#API1_With_arguments
If you want a PHP class that wraps around our APIs, let me know via PM.
avocado
04-17-2009, 01:35 PM
Wonderful - thank you! I had no idea such a resource existed.
Does this also take care of everything that's needed on the DNS end, or does that have to be done separately?
Will PM re PHP script.
cPanelDavidG
04-17-2009, 01:42 PM
Wonderful - thank you! I had no idea such a resource existed.
Does this also take care of everything that's needed on the DNS end, or does that have to be done separately?
Will PM re PHP script.
This is the same function the cPanel interface itself calls when parking a domain, so it will act exactly the same as the cPanel interface acts. This means all the DNS entries, Apache entries etc. that need to be done are all handled automatically.
avocado
04-17-2009, 01:45 PM
Spectacular - this will be a lifesaver.
Thank you!