// session starting$session = \cyberpanelv4::startSession();
// outputs will come as an array.$websites = \cyberpanelv4::listWebsites($session);
// print if there is an errorif(\cyberpanelv4::$errors) {
print_r(\cyberpanelv4::$errors);
} else {
// array output
print_r($websites);
}
Start session and list directory
// session starting$session = \cyberpanelv4::startSession();
// outputs will come as an array.$directory = \cyberpanelv4::listPath($session, "example.com", "/home/www.example.com/public_html/");
// print if there is an errorif(\cyberpanelv4::$errors) {
print_r(\cyberpanelv4::$errors);
} else {
// array output
print_r($directory);
}
Save session with $_SESSION
// php session start
session_start();
// session starting$session = \cyberpanelv4::startSession();
// print if there is an errorif(\cyberpanelv4::$errors) {
print_r(\cyberpanelv4::$errors);
} else {
// save the session$_SESSION["cyberpanel_session"] = $session;
}
Use the saved session
// php session start
session_start();
$saved_session = $_SESSION["cyberpanel_session"];
// example// outputs will come as an array.$websites = \cyberpanelv4::listWebsites($saved_session);
// print if there is an errorif(\cyberpanelv4::$errors) {
print_r(\cyberpanelv4::$errors);
} else {
// array output
print_r($websites);
}