PHP Classes
elePHPant
Icontem

PHP Command Line Shell: Use ncurses to get key inputs and write shell text

Recommend this page to a friend!
  Info   Videos Videos   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2013-07-24 (3 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 327 All time: 6,788 This week: 941Up
Version License PHP version Categories
kmd 0.1Public Domain4Console
Description Author

This class can use ncurses to get key inputs and write text to the command line shell.

It can initialized the ncurses extension to use the current shell optionally using a given shell history file and outputting a given screen file.

The class provides functions to move the position of the cursor and display text on the screen.

Sub-classes may extend the base class to define how to handle the use of certain keys like return, tab or escape, so sub-classes can define the output to display the screen as result of actions triggered by those keys.

Innovation Award
PHP Programming Innovation award winner
August 2013
Winner


Prize: One subscription to the PDF edition of the PHP Architect magazine
Command line shell applications often use the ncurses extension to read the user input and format the output to the shell terminal.

This class can help developing ncurses based applications by providing means to define how to interact with the user when he uses common keys like return, tab, escape and the cursor keys.

Manuel Lemos
Picture of François NEUMANN-RYSTOW
Name: François NEUMANN-RYSTOW <contact>
Classes: 3 packages by
Country: France France
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

Videos  
  • Php cmd shell class using ncurses
  Files folder image Files  
File Role Description
Plain text file kmd.php Class ncurses commandline class
Accessible without login Plain text file sample-kmd-basic.php Example basic sample, just to instanciate the class
Accessible without login Plain text file sample-kmd-php.php Example rewrite of php -a, php interactive shell
Accessible without login Plain text file sample-kmd-shell.php Example wrapping linux console for education or joke purpose.
Accessible without login Plain text file sample-kmd-sybase.php Appl. Microsoft sql server commandline client

 Version Control Unique User Downloads Download Rankings  
 0%
Total:327
This week:0
All time:6,788
This week:941Up