Version: 0.0.1

Type: Class

Category: Other

License: GNU General Public License

Description: This is a small script which can be used as a template to interact with a UNIX console via misc commands. Still in beta, but can sucessfully read from the console. (via /dev/stdin)



<?php

Class Console {

var $left_key = "";
var $right_key = "";
var $up_key = "";
var $down_key = "";

var $num_left_key = "";
var $num_right_key = "";
var $num_up_key = "";
var $num_down_key = "";

var $f1 = "";
var $f2 = "";
var $f3 = "";
var $f4 = "";
var $f5 = "";
var $f6 = "";
var $f7 = "";
var $f8 = "";
var $f9 = "";
var $f10 = "";
var $f11 = "";
var $f12 = "";

Function Readln(){
 	$info_IN = fopen("/dev/stdin","r");
	while (!feof($info_IN)) {
		$IN = fgetc($info_IN);
		if ($IN != "n"){
//			$IN .= $IN;
			echo $IN;
		}

	}
//	return $IN;
	fclose($info_IN);
}

}

$nig = new Console;
$nig->Readln();
//echo $nig->Readln();

?>