Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUGESTION: Import domains from webhosting control panels #33

Open
ghost opened this issue Oct 6, 2022 · 3 comments
Open

SUGESTION: Import domains from webhosting control panels #33

ghost opened this issue Oct 6, 2022 · 3 comments

Comments

@ghost
Copy link

ghost commented Oct 6, 2022

Would be a nice feature if you can add options to import the domains from the control panels using their API.
Almost all control panels allow to curl the a domain list using their API.
We won't need to type in hundreds or thousands of domains on the control panel or do an export to add these domains to the conf.php. It would simply import them automatically using the cron.

What do you think?

@liuch
Copy link
Owner

liuch commented Oct 7, 2022

This is a good idea. But there are probably many control panels with their own API, and I do not use any of them. It is quite difficult to write and debug usage unknown APIs. Maybe you had in mind the import of domains from some standard format, like CSV?

By the way: Do you know that domains can be automatically added to the database by using allowed_domains option in the config file?

@ghost
Copy link
Author

ghost commented Oct 7, 2022

This is a good idea. But there are probably many control panels with their own API, and I do not use any of them. It is quite difficult to write and debug usage unknown APIs. Maybe you had in mind the import of domains from some standard format, like CSV?

By the way: Do you know that domains can be automatically added to the database by using allowed_domains option in the config file?

All APIs have 1 thing in common: They can be queried viy curl. So, if you add a form to ask for:

  • Full API link to query the domains
  • API credentials

It should be enough for the system to query the control panels.

  • No, I didn't know I could add automatically domains with that option. ;-)

@liuch
Copy link
Owner

liuch commented Oct 8, 2022

I see at least two problems:

  1. API can use a temporary token that is passed after authentication.
  2. The complexity of processing the result. You need to know the response format and its structure for each control panel to extract the domain name.

It seems to me more reasonable to do this: your script retrieves a list of domains through the API and passes it as CSV to my script through a temporary file or pipe to import your domains to the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant