Hi
we write a pxomoxy web ui
i no understand
realm
is what?
public function __construct ($hostname, $username, $realm, $password, $port = 8006, $verify_ssl = false) {
if (empty($hostname) || empty($username) || empty($realm) || empty($password) || empty($port)) {
throw new PVE2_Exception("Hostname/Username/Realm/Password/Port required for PVE2_API object constructor.", 1);
}
// Check hostname resolves.
if (gethostbyname($hostname) == $hostname && !filter_var($hostname, FILTER_VALIDATE_IP)) {
throw new PVE2_Exception("Cannot resolve {$hostname}.", 2);
}
// Check port is between 1 and 65535.
if (!filter_var($port, FILTER_VALIDATE_INT, ['options' => ['min_range' => 1, 'max_range' => 65535]])) {
throw new PVE2_Exception("Port must be an integer between 1 and 65535.", 6);
}
// Check that verify_ssl is boolean.
if (!is_bool($verify_ssl)) {
throw new PVE2_Exception("verify_ssl must be boolean.", 7);
}
$this->hostname = $hostname;
$this->username = $username;
$this->realm = $realm;
$this->password = $password;
$this->port = $port;
$this->verify_ssl = $verify_ssl;
}
we write a pxomoxy web ui
i no understand
realm
is what?
public function __construct ($hostname, $username, $realm, $password, $port = 8006, $verify_ssl = false) {
if (empty($hostname) || empty($username) || empty($realm) || empty($password) || empty($port)) {
throw new PVE2_Exception("Hostname/Username/Realm/Password/Port required for PVE2_API object constructor.", 1);
}
// Check hostname resolves.
if (gethostbyname($hostname) == $hostname && !filter_var($hostname, FILTER_VALIDATE_IP)) {
throw new PVE2_Exception("Cannot resolve {$hostname}.", 2);
}
// Check port is between 1 and 65535.
if (!filter_var($port, FILTER_VALIDATE_INT, ['options' => ['min_range' => 1, 'max_range' => 65535]])) {
throw new PVE2_Exception("Port must be an integer between 1 and 65535.", 6);
}
// Check that verify_ssl is boolean.
if (!is_bool($verify_ssl)) {
throw new PVE2_Exception("verify_ssl must be boolean.", 7);
}
$this->hostname = $hostname;
$this->username = $username;
$this->realm = $realm;
$this->password = $password;
$this->port = $port;
$this->verify_ssl = $verify_ssl;
}