Update README.md

This commit is contained in:
Tsvetelin Tsonev 2018-04-21 12:26:57 +02:00 committed by GitHub
parent 2594b13b10
commit aef6611307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -31,17 +31,17 @@ use Nilet\Components\FileSystem\Directory;
require_once "vendor/autoload.php";
$config = new Nilet\Components\Configuration\Config();
$config->setConfigFolder(new Directory(__DIR__ . "/config"));
$api = new VirtualminApi("domain.com", 1221, "root", "password", $config);
$config = new Config();
$config->setConfigDir(new Directory(__DIR__ . "/config"));
$api = new Virtualmin("domain.com", 1221, "root", "password", $config);
$domain = "domain.com";
```
Email and Ftp accounts
```
$emailManager = $api->createEmailAccountManager();
$ftpManager = $api->createFtpAccountManager();
$emailManager = $api->createEmailManager();
$ftpManager = $api->createFtpManager();
$emailManager->createEmailAccount($domain, "emailaccount1", "123", "Real name", 5);
$ftpManager->createFtpAccount($domain, "onlyftp4", "123");