name . "\n"; $host->timeout = 60; $host->autoclose = 30; $rc = $host->connect("tn3270://fandezhi.efglobe.com:23",10); if($rc != 0) { die("Connection failed, rc=" . $rc . "\n"); } $rc = $host->waitforready(10); if($rc != 0) { die("Host is not ready, rc=" . $rc . "\n"); } echo "Connected: " . ($host->online ? "Yes" : "No") . "\n"; echo "Ready: " . ($host->ready ? "Yes" : "No") . "\n"; echo "Message: " . $host->message . "\n"; echo "Secure: " . $host->sslstate . "\n"; echo "Contents:\n" . $host . "\n"; $host->disconnect(); $host->close(); die("Success!!\n"); ?>