.pdf)
WHM Plugins
| API Version: | 1 - Click here for documentation |
|---|---|
| Syntax: | SubDomain::listsubdomainsop( ) |
| Description: | Retrieve a list of subdomains associated with the cPanel account, enclosed in |
| Returns: | |
<option value="sub1">sub1.example.com<option> <option value="sub2">sub2.example.com<option> <option value="sub3">sub3.example.com<option> |
| API Version: | 1 - Click here for documentation |
|---|---|
| Syntax: | SubDomain::addsubdomain( domain, rootdomain, usecanonicalname, disallowdot, dir ) |
| Description: | Add a subdomain. |
| Parameters: | |
| domain (string) | |
| The local part of the subdomain to add (e.g., sub if the subdomain was sub.example.com). This value should not contain the domain with which the subdomain is associated. | |
| rootdomain (string) | |
| The domain to which to add the subdomain (e.g., example.com). | |
| usecanonicalname (boolean (optional)) | |
| Set this parameter to 1 when adding a wild card subdomain. | |
| disallowdot (boolean (optional)) | |
| If this parameter is set to 1, the function will automatically strip dots from the $domain value. | |
| dir (string (optional)) | |
| The subdomain's document root within the account's home directory. This value defaults to a directory of the same name as the subdomain in the public_html directory (e.g., public_html/subdomain/ if the domain's name was subdomain.example.com). | |
| Returns: | |
This function does not produce any output.
|
| API Version: | 1 - Click here for documentation |
|---|---|
| Syntax: | SubDomain::cplistsubdomains( ) |
| Description: | Retrieve a list of subdomains associated with the cPanel account. Each subdomain is separated by a line break. |
| Returns: | |
sub1.example.com<br> sub2.example.com<br> sub3.example.com<br> |
| API Version: | 1 - Click here for documentation |
|---|---|
| Syntax: | SubDomain::disablesubrd( sub ) |
| Description: | Disable a subdomain's redirect. |
| Parameters: | |
| sub (string) | |
| The subdomain for which to disable the redirect. This parameter can take a literal subdomain (e.g., sub) or a full subdomain name (e.g., subomdain.example.com). | |
| Returns: | |
The output should resemble the following: <b>Redirection has been disabled on $subdomain.</b> |
| API Version: | 1 - Click here for documentation |
|---|---|
| Syntax: | SubDomain::setsuburl( sub, url ) |
| Description: | Redirect a subdomain to a specific URL. |
| Parameters: | |
| sub (string) | |
| The subdomain to redirect. | |
| url (string) | |
| The URL to which to redirect. | |
| Returns: | |
This function does not produce any output.
|