PHP Classes

PHP DirectAdmin: Manage hosting accounts with DirectAdmin Web panel

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
StarStar 30%Total: 2,818 All time: 1,336 This week: 159Up
Version License Categories
phpdirectadmin 1.0.0GNU Lesser Genera...PHP 5, Systems administration, Web se..., H...
Description Author

This class can be used to manage hosting accounts controlled by the DirectAdmin Web panel.

It connects to a DirectAdmin panel Web server and can send commands to perform several types of account management actions.

Currently it can:

- Create and modify accounts
- Manage account e-mail addresses
- Create databases
- Take backups
- Retrieve the list of available backups
- Retrieve account usage statistics of disk space, bandwidth, FTP and databases

Picture of Hadar Porat
Name: Hadar Porat <contact>
Classes: 5 packages by
Country: United States United States
Age: 39
All time rank: 31335 in United States United States
Week rank: 557 Down70 in United States United States Down

phpDirectAdmin Class

This class can be used to communicate with DirectAdmin ( Hosting Panel.
The class includes emails management, creating and modifying account, disk and bandwidth usage and some more.

The function uses cURL lib for communication.

Function inside:
The functions that can be used are:

getStats() - get stats array (diskspace, bandwidth, emails, ftp, databases) - both used and max
createUserAccount() - create a new directadmin account
modifyUserAccountPackage() - modify account to auto package
customizeUserAccountPackage() - customize account package
createDatabase - creates a new mysql database
createBackup() - creates a account backup
chmodBackup() - chmod a account backup for downloading
getBackupsList() - returns backups array list
getEmailList() - returns email accounts array list
getEmail() - returns email account information
createEmail() - creates new email account
updateEmail() - updates emailbox password
deleteEmail() - deletes email account

The class uses cookies to store the username and password.
These files should not be accessed by htdocs or public html.

The cookies files don't get deleted, so if you change the username and password in the scripts, 
try deleting the cookies files.

Error Reporting:
There is no error reporting in this class.
If someone can help with that, I will gladly add it to the function...
  • email_example.gif
  Files folder image Files  
File Role Description
Plain text file Class Main Class
Plain text file email_example.php Example Emails Management Example
Plain text file LICENSE Lic. LICENSE
Plain text file README Doc. Readme

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:1,336
This week:159Up
User Ratings User Comments (2)
 All time
The base for the class is good, but there aren't any function...
11 years ago (Tom Maaswinkel)
Why not using the DA api?
13 years ago (Olaf Lederer)
For more information send a message to info at phpclasses dot org.