I wanted to create create a set of tools to be able to create/modify/delete domains from the command line.
This approach will be most practical when doing migrations from other control panels for example, with the list of domains+passwords, you'd be able to replicate the system in a few minutes.
There is some documentation about usage at the dokuwiki
here.
For any suggestions, modifications of the code,etc .. post it here or edit the wiki, so it can be useful for us all
UPDATE
I attach the ninth release of the scripts to manage domains, with ftp creation and mail creation, and other interesting stuff, basically anything you will need to replicate a domain from other place (now also creation of htusers for stats).
From the fifth release also there's the domain_dns.php file that allows you to create dns,www,A, .. and in general any type of the entries that supports ispcp.
From the sixth release you can also delete domains. Act with caution and a handful of backups.
The eight release comes with general improvements in code organization and the ability to specify the username for ftp creation, also you can now create the domain using admin hosting plans instead of reseller hosting plans.
The ninth release, has been tested to work with 1.0.5, the new features are that you can specify the user for the ftp account, dns for the alias now works properly, and there are some new verifications that will avoid making errors.
It's designed to work with the current 1.0.5 (there are older working versions too)
You can call it something like:
php domain.php --action create_domain --created_by "reseller" --domain "example.com" --password "password25" --hosting_plan "FullPlan"
To create the hosting for the domain example.com using the template FullPlan and with the admin password password25, note that when creating a domain, the name of the admin and the domain will be the same (due to the script limitations)
or
php domain.php --action create_ftp --created_by "reseller" --domain "example.com" --password "password25" --hosting_plan "FullPlan" --user "username"
To create the ftp account username@example.com for the previous domain.
It has been extensively tested, and it shouldn't break anything.
For anyone interested in using the script, I'm not a programmer so the code probably will hurt your eyes, any advice will be taken into consideration.
I hope it will be of use to you.
UPDATE: New features are included in every new release of this scripts, acording with the new features in ispcp, but the syntax and the core functionality is basically the same.
There is the version working in ispcp 1.0.3.1
scripts_1_0_3_1.tar.gz (Size: 14.86 KB / Downloads: 11)
There is the version working for ispcp 1.0.4
scripts_1_0_4.tar.gz (Size: 14.89 KB / Downloads: 25)
The version for ispcp 1.0.5 and newer
scripts_1_0_5.tar.gz (Size: 14.73 KB / Downloads: 29)
NOTE: For the version working on 1.0.0 systems send me a PM, it's obsoleted and might confuse people.