connect.php
347 Bytes
<?php
printf("PW3270 Connection test\n");
$host = new tn3270("");
$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");
}
$host->disconnect();
die("Success!!\n");
?>