Massive import

Asked by Sotiris Moursias

I'm in the process of moving a hosting server with around 1100 domains and no control panel software of any kind to a new server.
I'm thinking of using EHCP, and would be useful if there was a way of 'importing' domains data
I do have a list with the domain names, desired usernames and passwords for FTP and email, and the current file structure of the web server.
Apart from looking at the code behind the form used in the 'add domain' form and creating a script for myself, is there anything available? Clicking 'add domain' and copying and pasting all form data from excel 1100 times is obviously far from 'optimal'...

Question information

English Edit question
Easy Hosting Control Panel for Ubuntu Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
Best ehcpdeveloper (ehcpdeveloper) said :

1. In ehcp, we have "bulk add domain" feature, in which you can add almost any number of domains in single step, having same ftp.
2. if you want to add many domains, having different ftp's, you may use some simple php code which adds domains, ftpusers etc.
look at api folder for examples.

you may use repeated php code like this:

as in api examples.
you may add lines like this as many as your domains, then, you may run that php in your server, in a web php page, in ehcp dir.
you may even build that php lines by using any spreadsheet program, such as openoffice or excel.

see you.

Revision history for this message
Sotiris Moursias (lists-sotis) said :

Thanks a million, that


was exactly the hint I was looking for.
Of course I found out how to create e-mail addresses afterwards, and then created a small script to loop my domains.

EHCP rocks :)

Revision history for this message
Sotiris Moursias (lists-sotis) said :

Thanks ehcpdeveloper, that solved my question.

Revision history for this message
ehcpdeveloper (ehcpdeveloper) said :

nice to see it is solved