Login   Register  
PHP Classes
elePHPant
Icontem

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

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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 (0 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 298 This week: 2All time: 6,517 This week: 858Up
Version License PHP version Categories  
kmd 0.1Public Domain4Console
Description Author  
PHP Programming Innovation award winner
August 2013
Winner


Prize: One subscription to the PDF edition of the PHP Architect magazine
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.
Picture of François NEUMANN-RYSTOW
Name: François NEUMANN-RYSTOW <contact>
Classes: 3 packages by
Country: France France
Age: 33
All time rank: 113638 in France France
Week rank: 371 Up16 in France France Up
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

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
 Version Control Unique User Downloads Download Rankings  
 0%Total:298All time:6,517
 This week:2This week:858Up