function __destruct()
{
//echo "\nMemory usage: ".memory_get_usage()." bytes \n";
//echo "Peak memory usage: ".memory_get_peak_usage()." bytes \n\n";
if ($this->connected) {
if ($this->loggedin) {
$this->logout();
}
$this->disconnect();
}
if ($this->logging) {
$this->showLog();
}
}