API Documentation
Installation
1. Download the class file (see "Download" section below).
2. Upload the TheCPanelPHPObject.php
file to your project directory.
3. Include the file in your PHP script:
require_once 'TheCPanelPHPObject.php';
4. Instantiate the object with your cPanel hostname, username, and API token. You will need to generate an API token in your cPanel interface (navigate to cPanel > Security > Manage API Tokens):
$cpanel = new CPanelManager('cpanelphpobject.com:2083', 'cpaneluser', 'YOUR_API_TOKEN_HERE');
Basic Usage Example
All API calls through this object return either true
on success or an associative array containing an 'error'
key with a descriptive message on failure. Always check for the 'error'
key in the returned array to ensure the operation was successful.
$cpanel = new CPanelManager('cpanelphpobject.com:2083', 'cpaneluser', 'YOUR_API_TOKEN_HERE');
// Example: Create an email account
$result = $cpanel->createEmail('newuser', 'cpanelphpobject.com', 'StrongPass123!', 500);
if (isset($result['error'])) {
echo "Error creating email: " . $result['error'] . "\n";
} else {
echo "Email account created successfully!\n";
}
// Example: List all email accounts
$emailAccounts = $cpanel->listEmailAccounts();
if (isset($emailAccounts['error'])) {
echo "Error listing emails: " . $emailAccounts['error'] . "\n";
} else {
echo "Current Email Accounts:\n";
foreach ($emailAccounts as $account) {
echo "- " . $account['email'] . "@" . $account['domain'] . "\n";
}
}
Function Reference
new CPanelManager($host, $user, $token)
Description: Initializes a new instance of the CPanelManager
class to interact with the cPanel API. This is the first step before calling any other methods.
Parameter | Type | Description | Required |
---|---|---|---|
$host | string | Your cPanel hostname with port (e.g., cpanelphpobject.com:2083 ). Use the SSL port. | Yes |
$user | string | Your cPanel username for authentication. | Yes |
$token | string | Your cPanel API token, generated from your cPanel interface. | Yes |
Returns: An instance of CPanelManager
.
$cpanel = new CPanelManager('cpanelphpobject.com:2083', 'cpaneluser', 'YOUR_API_TOKEN_HERE');
Email Management
createEmail($name, $domain, $password, $quota = 0)
Description: Creates a new email account under the specified domain on your cPanel server.
Parameter | Type | Description | Required |
---|---|---|---|
$name | string | The desired username part of the new email address (e.g., 'alice'). | Yes |
$domain | string | The domain under which the new email account will be created (e.g., 'cpanelphpobject.com'). | Yes |
$password | string | The password for the new email account. Choose a strong, unique password. | Yes |
$quota | int | The storage limit in megabytes (MB) for the email account. Set to 0 for unlimited quota. | No (default: 0) |
Returns: true
on successful creation, or an array
with an 'error'
key and message on failure.
$result = $cpanel->createEmail('alice', 'cpanelphpobject.com', 'MyS3cur3P@ssw0rd!', 250); // 250 MB quota
if (isset($result['error'])) {
echo "Error creating email: " . $result['error'];
} else {
echo "Email 'alice@cpanelphpobject.com' created successfully.";
}
deleteEmail($email)
Description: Deletes an existing email account from the cPanel server. This action is irreversible.
Parameter | Type | Description | Required |
---|---|---|---|
$email | string | The full email address to be deleted (e.g., 'alice@cpanelphpobject.com'). | Yes |
Returns: true
on successful deletion, or an array
with an 'error'
key and message on failure.
$result = $cpanel->deleteEmail('alice@cpanelphpobject.com');
if (isset($result['error'])) {
echo "Error deleting email: " . $result['error'];
} else {
echo "Email 'alice@cpanelphpobject.com' deleted successfully.";
}
changeEmailPassword($email, $newPassword)
Description: Changes the password for an existing email account.
Parameter | Type | Description | Required |
---|---|---|---|
$email | string | The full email address for which to change the password (e.g., 'john@cpanelphpobject.com'). | Yes |
$newPassword | string | The new password for the email account. It should be strong and unique. | Yes |
Returns: true
on successful password change, or an array
with an 'error'
key and message on failure.
$result = $cpanel->changeEmailPassword('john@cpanelphpobject.com', 'N3wS3cur3P@ss!');
if (isset($result['error'])) {
echo "Error changing password: " . $result['error'];
} else {
echo "Password for 'john@cpanelphpobject.com' changed successfully.";
}
updateEmailQuota($email, $quota)
Description: Updates the storage quota for an existing email account.
Parameter | Type | Description | Required |
---|---|---|---|
$email | string | The full email address whose quota needs to be updated (e.g., 'john@cpanelphpobject.com'). | Yes |
$quota | int | The new quota in megabytes (MB). Set to 0 for unlimited. | Yes |
Returns: true
on successful quota update, or an array
with an 'error'
key and message on failure.
$result = $cpanel->updateEmailQuota('john@cpanelphpobject.com', 1024); // Set to 1024 MB
if (isset($result['error'])) {
echo "Error updating quota: " . $result['error'];
} else {
echo "Quota for 'john@cpanelphpobject.com' updated to 1024 MB.";
}
listEmailAccounts()
Description: Retrieves a comprehensive list of all email accounts configured on your cPanel account, along with their details.
Parameter | Type | Description | Required |
---|---|---|---|
None |
Returns: An array
of associative arrays, where each inner array represents an email account (e.g., ['email', 'domain', 'quota', 'diskused']
). Returns an array
with an 'error'
key and message on failure.
$accounts = $cpanel->listEmailAccounts();
if (isset($accounts['error'])) {
echo "Error listing emails: " . $accounts['error'];
} else {
echo "Current Email Accounts:\n";
foreach ($accounts as $account) {
echo "- " . $account['email'] . "@" . $account['domain'] . "\n";
}
}
Email Forwards
addEmailForwarder($domain, $from, $to)
Description: Adds an email forwarder, redirecting emails from one address to another destination email address.
Parameter | Type | Description | Required |
---|---|---|---|
$domain | string | The domain of the email address from which emails will be forwarded (e.g., 'cpanelphpobject.com'). | Yes |
$from | string | The username part of the email address to forward (e.g., 'info'). The full address would be `info@cpanelphpobject.com`. | Yes |
$to | string | The destination email address where emails will be redirected (e.g., 'recipient@other.com'). | Yes |
Returns: true
on successful addition, or an array
with an 'error'
key and message on failure.
$result = $cpanel->addEmailForwarder('cpanelphpobject.com', 'support', 'myemail@gmail.com');
if (isset($result['error'])) {
echo "Error adding forwarder: " . $result['error'];
} else {
echo "Forwarder from 'support@cpanelphpobject.com' to 'myemail@gmail.com' added.";
}
deleteEmailForwarder($domain, $from, $to)
Description: Deletes an existing email forwarder. All parameters must exactly match the existing forwarder.
Parameter | Type | Description | Required |
---|---|---|---|
$domain | string | The domain associated with the email address from which the forward was set. | Yes |
$from | string | The username part of the forwarded email address to remove. | Yes |
$to | string | The destination email address of the forwarder to remove. | Yes |
Returns: true
on successful deletion, or an array
with an 'error'
key and message on failure.
$result = $cpanel->deleteEmailForwarder('cpanelphpobject.com', 'support', 'myemail@gmail.com');
if (isset($result['error'])) {
echo "Error deleting forwarder: " . $result['error'];
} else {
echo "Forwarder from 'support@cpanelphpobject.com' to 'myemail@gmail.com' deleted.";
}
Auto Responders
addAutoResponder($domain, $email, $from, $subject, $body, $start = true, $charset = 'UTF-8')
Description: Adds an auto-responder for an email account. This sends an automatic reply to incoming emails.
Parameter | Type | Description | Required |
---|---|---|---|
$domain | string | The domain of the email address for which to add the auto-responder. | Yes |
$email | string | The username part of the email address (e.g., 'vacation'). The full address would be `vacation@cpanelphpobject.com`. | Yes |
$from | string | The 'From' address that will appear on the auto-response email. | Yes |
$subject | string | The subject line of the auto-response email. | Yes |
$body | string | The main content or body of the auto-response email. | Yes |
$start | bool | Whether the auto-responder should be active immediately upon creation. Set to false to create it but keep it disabled initially. | No (default: true) |
$charset | string | The character set for the auto-response email. Common values are 'UTF-8'. | No (default: 'UTF-8') |
Returns: true
on successful addition, or an array
with an 'error'
key and message on failure.
$result = $cpanel->addAutoResponder('cpanelphpobject.com', 'info', 'noreply@cpanelphpobject.com', 'Out of Office Notification', 'I am currently out of office and will respond to your email as soon as possible. Thank you for your patience.', true);
if (isset($result['error'])) {
echo "Error adding auto-responder: " . $result['error'];
} else {
echo "Auto-responder for 'info@cpanelphpobject.com' added successfully.";
}
deleteAutoResponder($domain, $email)
Description: Deletes an existing auto-responder for a specific email account.
Parameter | Type | Description | Required |
---|---|---|---|
$domain | string | The domain of the email address associated with the auto-responder. | Yes |
$email | string | The username part of the email address (e.g., 'info') whose auto-responder is to be deleted. | Yes |
Returns: true
on successful deletion, or an array
with an 'error'
key and message on failure.
$result = $cpanel->deleteAutoResponder('cpanelphpobject.com', 'info');
if (isset($result['error'])) {
echo "Error deleting auto-responder: " . $result['error'];
} else {
echo "Auto-responder for 'info@cpanelphpobject.com' deleted successfully.";
}
Email Authentication and Routing
getDKIMStatus($domain)
Description: Retrieves the DKIM (DomainKeys Identified Mail) status for a given domain. DKIM helps to verify the authenticity of emails sent from your domain.
Parameter | Type | Description | Required |
---|---|---|---|
$domain | string | The domain name to check (e.g., 'cpanelphpobject.com'). | Yes |
Returns: An array
containing DKIM status data (e.g., ['status']
indicating 'enabled' or 'disabled', and other related info), or an array
with an 'error'
key and message on failure.
$dkimStatus = $cpanel->getDKIMStatus('cpanelphpobject.com');
if (isset($dkimStatus['error'])) {
echo "Error getting DKIM status: " . $dkimStatus['error'];
} else {
echo "DKIM Status for cpanelphpobject.com: " . (isset($dkimStatus['status']) ? $dkimStatus['status'] : 'N/A');
print_r($dkimStatus); // Provides full details
}
getSPFStatus($domain)
Description: Retrieves the SPF (Sender Policy Framework) status for a given domain. SPF helps to prevent email spoofing by specifying which mail servers are authorized to send email from your domain.
Parameter | Type | Description | Required |
---|---|---|---|
$domain | string | The domain name to check (e.g., 'cpanelphpobject.com'). | Yes |
Returns: An array
containing SPF status data (e.g., ['status']
indicating 'enabled' or 'disabled', and other related info), or an array
with an 'error'
key and message on failure.
$spfStatus = $cpanel->getSPFStatus('cpanelphpobject.com');
if (isset($spfStatus['error'])) {
echo "Error getting SPF status: " . $spfStatus['error'];
} else {
echo "SPF Status for cpanelphpobject.com: " . (isset($spfStatus['status']) ? $spfStatus['status'] : 'N/A');
print_r($spfStatus); // Provides full details
}
getEmailDiskUsage()
Description: Retrieves the current disk usage statistics for all email accounts under your cPanel account.
Parameter | Type | Description | Required |
---|---|---|---|
None |
Returns: An array
of associative arrays, where each inner array provides disk usage details for an email account (e.g., ['email', 'diskused', 'quota']
). Returns an array
with an 'error'
key and message on failure.
$diskUsage = $cpanel->getEmailDiskUsage();
if (isset($diskUsage['error'])) {
echo "Error getting email disk usage: " . $diskUsage['error'];
} else {
echo "Email Disk Usage:\n";
foreach ($diskUsage as $item) {
echo "- " . $item['email'] . ": " . $item['diskused'] . "MB / " . (($item['quota'] === 0) ? 'Unlimited' : $item['quota'] . 'MB') . "\n"; // Explicit 0 check
}
}
getEmailRouting($domain)
Description: Retrieves the email routing settings for a specific domain. This determines whether emails for the domain are handled locally or remotely.
Parameter | Type | Description | Required |
---|---|---|---|
$domain | string | The domain name for which to retrieve email routing settings (e.g., 'cpanelphpobject.com'). | Yes |
Returns: An array
containing email routing data (e.g., ['route']
indicating 'local' or 'remote'), or an array
with an 'error'
key and message on failure.
$routing = $cpanel->getEmailRouting('cpanelphpobject.com');
if (isset($routing['error'])) {
echo "Error getting email routing: " . $routing['error'];
} else {
echo "Email routing for cpanelphpobject.com: " . (isset($routing['route']) ? $routing['route'] : 'Unknown');
print_r($routing); // Provides full details
}
setDefaultEmail($domain, $defaultAddress)
Description: Sets the default email address (catch-all) for a domain. Emails sent to non-existent addresses on the domain will be directed here.
Parameter | Type | Description | Required |
---|---|---|---|
$domain | string | The domain for which to set the default email address. | Yes |
$defaultAddress | string | The email address to set as the default catch-all (e.g., 'catchall@cpanelphpobject.com'). Use ':fail:' to discard emails, or ':blackhole:' for a silent discard. | Yes |
Returns: true
on successful update, or an array
with an 'error'
key and message on failure.
// Set a catch-all email
$result = $cpanel->setDefaultEmail('cpanelphpobject.com', 'catchall@cpanelphpobject.com');
if (isset($result['error'])) {
echo "Error setting default email: " . $result['error'];
} else {
echo "Default email for 'cpanelphpobject.com' set to 'catchall@cpanelphpobject.com'.";
}
// Or set to discard all invalid emails
// $result = $cpanel->setDefaultEmail('cpanelphpobject.com', ':fail:');
Subdomain Management
createSubdomain($subdomain, $domain, $rootDomain = null)
Description: Creates a new subdomain under a specified main domain. This includes automatically configuring the necessary DNS records and document root.
Parameter | Type | Description | Required |
---|---|---|---|
$subdomain | string | The name of the subdomain (e.g., 'blog'). The full subdomain will be `blog.cpanelphpobject.com`. | Yes |
$domain | string | The main domain name under which the subdomain will be created (e.g., 'cpanelphpobject.com'). | Yes |
$rootDomain | string | Optional: The document root path for the subdomain, relative to your `public_html` directory (e.g., 'public_html/blog_content'). If omitted or `null`, cPanel will assign a default path like `public_html/subdomain`. | No (default: null) |
Returns: true
on successful creation, or an array
with an 'error'
key and message on failure.
$result = $cpanel->createSubdomain('dev', 'cpanelphpobject.com', 'public_html/dev_site');
if (isset($result['error'])) {
echo "Error creating subdomain: " . $result['error'];
} else {
echo "Subdomain 'dev.cpanelphpobject.com' created successfully.";
}
deleteSubdomain($subdomain, $domain)
Description: Deletes an existing subdomain. This also removes its associated DNS records and directory (but not the contents of the directory itself).
Parameter | Type | Description | Required |
---|---|---|---|
$subdomain | string | The name of the subdomain to delete (e.g., 'dev'). | Yes |
$domain | string | The main domain name from which the subdomain will be deleted (e.g., 'cpanelphpobject.com'). | Yes |
Returns: true
on successful deletion, or an array
with an 'error'
key and message on failure.
$result = $cpanel->deleteSubdomain('dev', 'cpanelphpobject.com');
if (isset($result['error'])) {
echo "Error deleting subdomain: " . $result['error'];
} else {
echo "Subdomain 'dev.cpanelphpobject.com' deleted successfully.";
}
listSubdomains()
Description: Retrieves a list of all subdomains configured under your cPanel account.
Parameter | Type | Description | Required |
---|---|---|---|
None |
Returns: An array
of associative arrays, where each inner array represents a subdomain (e.g., ['domain', 'rootdomain', 'dir']
). Returns an array
with an 'error'
key and message on failure.
$subdomains = $cpanel->listSubdomains();
if (isset($subdomains['error'])) {
echo "Error listing subdomains: " . $subdomains['error'];
} else {
echo "Current Subdomains:\n";
foreach ($subdomains as $sub) {
echo "- " . $sub['domain'] . " (Path: " . (isset($sub['dir']) ? $sub['dir'] : 'N/A') . ")\n"; // Explicit check
}
}
Redirects
addRedirect($domain, $url, $redirectTo, $wildCard = false)
Description: Adds a new HTTP redirect, forwarding requests from a source URL or domain to a specified destination URL.
Parameter | Type | Description | Required |
---|---|---|---|
$domain | string | The primary domain name on which the redirect is being set. | Yes |
$url | string | The source path or full URL to redirect from (e.g., 'old-page.html', 'blog', or 'sub.cpanelphpobject.com'). If it's a path, it's relative to the `public_html` of `$domain`. | Yes |
$redirectTo | string | The full destination URL to redirect to (e.g., 'https://new-site.com/new-page.html'). | Yes |
$wildCard | bool | Set to true to enable a wildcard redirect, forwarding all files within a source directory to their corresponding path in the destination (e.g., `/old/*` to `/new/*`). Defaults to `false`. | No (default: false) |
Returns: true
on successful addition, or an array
with an 'error'
key and message on failure.
$result = $cpanel->addRedirect('cpanelphpobject.com', 'old-page.html', 'https://cpanelphpobject.com/new-page.html');
if (isset($result['error'])) {
echo "Error adding page redirect: " . $result['error'];
} else {
echo "Page redirect added successfully.";
}
// Add a wildcard redirect for a directory
$result = $cpanel->addRedirect('cpanelphpobject.com', 'old-blog', 'https://cpanelphpobject.com/new-blog', true);
if (isset($result['error'])) {
echo "Error adding wildcard redirect: " . $result['error'];
} else {
echo "Wildcard redirect added successfully.";
}
deleteRedirect($domain, $url, $redirectTo)
Description: Deletes an existing HTTP redirect. All parameters must exactly match the existing redirect to be removed.
Parameter | Type | Description | Required |
---|---|---|---|
$domain | string | The domain where the redirect was set. | Yes |
$url | string | The source path or full URL of the redirect to remove. | Yes |
$redirectTo | string | The destination URL of the redirect to remove. | Yes |
Returns: true
on successful deletion, or an array
with an 'error'
key and message on failure.
$result = $cpanel->deleteRedirect('cpanelphpobject.com', 'old-page.html', 'https://cpanelphpobject.com/new-page.html');
if (isset($result['error'])) {
echo "Error deleting redirect: " . $result['error'];
} else {
echo "Redirect deleted successfully.";
}
listRedirects($domain)
Description: Lists all configured redirects for a specific domain.
Parameter | Type | Description | Required |
---|---|---|---|
$domain | string | The domain name to list redirects for (e.g., 'cpanelphpobject.com'). | Yes |
Returns: An array
of associative arrays, where each inner array contains details of a redirect (e.g., ['source', 'destination', 'type']
). Returns an array
with an 'error'
key and message on failure.
$redirects = $cpanel->listRedirects('cpanelphpobject.com');
if (isset($redirects['error'])) {
echo "Error listing redirects: " . $redirects['error'];
} else {
echo "Current Redirects for cpanelphpobject.com:\n";
foreach ($redirects as $redir) {
echo "- From: " . $redir['source'] . " To: " . $redir['destination'] . " (Type: " . (isset($redir['type']) ? $redir['type'] : 'Unknown') . ")\n"; // Explicit check
}
}
DNS Records (ZoneEdit)
listDNSRecords($domain)
Description: Lists all DNS records for a specific domain's zone file, including their name, type, address/value, TTL, and an essential line number for deletion.
Parameter | Type | Description | Required |
---|---|---|---|
$domain | string | The domain name to list DNS records for (e.g., 'cpanelphpobject.com'). | Yes |
Returns: An array
of associative arrays, where each inner array represents a DNS record (e.g., ['name', 'type', 'address', 'ttl', 'line']
). The 'line'
key is crucial for deleting records. Returns an array
with an 'error'
key and message on failure.
$dnsRecords = $cpanel->listDNSRecords('cpanelphpobject.com');
if (isset($dnsRecords['error'])) {
echo "Error listing DNS records: " . $dnsRecords['error'];
} else {
echo "DNS Records for cpanelphpobject.com:\n";
foreach ($dnsRecords as $record) {
echo "- Line " . (isset($record['line']) ? $record['line'] : 'N/A') . ": " . (isset($record['name']) ? $record['name'] : 'N/A') . " (" . (isset($record['type']) ? $record['type'] : 'N/A') . ") -> " . (isset($record['address']) ? $record['address'] : 'N/A') . " (TTL: " . (isset($record['ttl']) ? $record['ttl'] : 'N/A') . ")\n"; // Explicit checks
}
}
addDNSRecord($domain, $name, $type, $ttl, $address)
Description: Adds a new DNS record to a domain's zone file. Supported types include A, CNAME, MX, TXT, etc.
Parameter | Type | Description | Required |
---|---|---|---|
$domain | string | The domain to which the DNS record will be added. | Yes |
$name | string | The name of the record (e.g., 'sub.cpanelphpobject.com.' for a subdomain, or '@' for the main domain). Remember to include the trailing dot for FQDNs. | Yes |
$type | string | The type of DNS record (e.g., 'A', 'CNAME', 'MX', 'TXT'). | Yes |
$ttl | int | The Time To Live (TTL) in seconds. This specifies how long resolvers should cache the record. Common values are 14400 (4 hours) or 3600 (1 hour). | Yes |
$address | string | The record's content or destination. For 'A' records, this is an IP address. For 'CNAME', it's the target domain. For 'TXT', it's the text string (often enclosed in quotes). | Yes |
Returns: true
on successful addition, or an array
with an 'error'
key and message on failure.
// Example 1: Add an A record for a subdomain
$result = $cpanel->addDNSRecord('cpanelphpobject.com', 'test.cpanelphpobject.com.', 'A', 14400, '192.168.1.1');
if (isset($result['error'])) {
echo "Error adding DNS A record: " . $result['error'];
} else {
echo "DNS A record for 'test.cpanelphpobject.com' added successfully.";
}
// Example 2: Add a TXT record (e.g., for SPF or domain verification)
$result = $cpanel->addDNSRecord('cpanelphpobject.com', 'cpanelphpobject.com.', 'TXT', 3600, '\"v=spf1 include:_spf.google.com ~all\"');
if (isset($result['error'])) {
echo "Error adding DNS TXT record: " . $result['error'];
} else {
echo "DNS TXT record added successfully.";
}
deleteDNSRecord($domain, $line)
Description: Deletes a specific DNS record from a domain's zone file. This requires the exact `line` number of the record, which must be obtained using listDNSRecords()
.
Parameter | Type | Description | Required |
---|---|---|---|
$domain | string | The domain from which to delete the DNS record. | Yes |
$line | int | The unique line number of the record to delete. This number is specific to the cPanel zone file and must be fetched via listDNSRecords() . | Yes |
Returns: true
on successful deletion, or an array
with an 'error'
key and message on failure.
// Step 1: List records to find the line number of the record to delete
$dnsRecords = $cpanel->listDNSRecords('cpanelphpobject.com');
$lineToDelete = null; // Initialize variable
if (!isset($dnsRecords['error']) && is_array($dnsRecords)) {
foreach ($dnsRecords as $record) {
// Find the specific record you want to delete by its name and type
if (isset($record['name']) && ($record['name'] === 'test.cpanelphpobject.com.') && (isset($record['type']) && $record['type'] === 'A')) {
$lineToDelete = $record['line'];
break; // Found it, no need to continue
}
}
// Step 2: Attempt to delete the record if found
if (null !== $lineToDelete) { // Using explicit null check as per style guide
$result = $cpanel->deleteDNSRecord('cpanelphpobject.com', $lineToDelete);
if (isset($result['error'])) {
echo "Error deleting DNS record on line " . $lineToDelete . ": " . $result['error'];
} else {
echo "DNS record on line " . $lineToDelete . " deleted successfully.";
}
} else {
echo "Specified DNS record not found for deletion.";
}
} else {
// Explicitly handle error or default message
echo "Error listing DNS records: " . (isset($dnsRecords['error']) ? $dnsRecords['error'] : "Unknown API error.");
}
Password Generator
generateStrongPassword($length = 20)
Description: Generates a cryptographically secure, random password. It ensures the password contains a mix of lowercase letters, uppercase letters, numbers, and special characters for maximum strength.
Parameter | Type | Description | Required |
---|---|---|---|
$length | int | The desired total length of the generated password. Minimum length is 4 to ensure all character types are included. | No (default: 20) |
Returns: A string
representing the generated strong password.
$strongPassword = $cpanel->generateStrongPassword(24);
echo "Generated Strong Password: " . $strongPassword . "\n"; // Example: "Ab1!cDeFg2#IjKlM3$NoPqR4%tUv"
$defaultLengthPassword = $cpanel->generateStrongPassword();
echo "Default Length Password (20 chars): " . $defaultLengthPassword . "\n";
Download
Download the latest version of The cPanel PHP Object here. Choose your preferred archive format:
Software License
MIT License
Copyright (c) 2025 Rev. Jeffery L. Paris
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Resource Links
Your safety and peace of mind are our priority. We carefully vet all external links in this section to ensure they are free from scams, spam, and intrusive pop-ups, providing a safe and reliable Browse experience for all our valued visitors.
TheMaths.Online offers free online math practice for students. Practice addition, subtraction, multiplication, division, pre-algebra, geometry, and more with instant feedback, designed to help improve math skills.