Creating sub domain (DNS A-Record) with PHP - pointing to the hosted Folder

chuddy09

Registered
Mar 31, 2014
1
0
1
cPanel Access Level
Root Administrator
We working on a new project that will allow us to create sub-domains for most application and C-Level officers and work group blogs. We hope to manage each account in securely and allow admin officers to fill a form and create: folder, domain name(sub-domain on host pointing to the folder), email addresses (based on the sub-domain name), database, and create files.

Can any body help us with info on how to achieve the following:

1) Create sub domain (DNS A-Record) pointing to the hosted Folder
2) Create Email Address, with the sub-domain name.

Thank you.

Prince C. Benjamin,
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

Assuming you do not plan to use cPanel itself, you would have to use our API within your PHP application. Searching for "PHP API" on our forums is a good way to get started. You will get results such as this:

Using API to add Email Accounts through PHP

Thank you.