PHP code example of p0n0marev / ispmanager6
1. Go to this page and download the library: Download p0n0marev/ispmanager6 library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
p0n0marev / ispmanager6 example snippets
use P0n0marev\Ispmanager6\Client;
// Token authentication
$client = new Client([
'host' => 'localhost',
'username' => 'admin',
'password' => 'secret'
]);
$client->authenticate();
// Users
$users = $client->users()->list();
print '<pre>';
print_r($users);
print '</pre>';
// Create User
$userEntity = new UserEntity([
'name' => 'ponomarev',
'fullname' => 'Sergei Ponomarev',
'passwd' => 'secret',
'confirm' => 'secret',
]);
$rs = $client->users()->create($userEntity);
var_dump($rs);
// Presets
$presets = $client->presets()->list();
var_dump($presets);