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"); } $host->disconnect(); die("Success!!\n"); ?>