$hawin32 = new COM("HAWin32");
$haScript = $hawin32->haInitialize("hawphp");

//$haScript->haSizeHyperACCESS(3); //uncomment if you want haw visible
$haScript->haWaitForConnection(1, 100000);

$haScript->haWaitForPrompt("some prompt>");
$haScript->haTypeText("some command\r");

$datastr = $haScript->haGetInput(0, -1, 10000, 10000);
echo "<p>$datastr</p>";

$haScript->haWaitForConnection(2, 100000);



To execute this sample save the above code as a php file on your php server. Visit the page to execute the script. The script will connect to a device, issue some command, and display the result on the web page.

Return to sample script index