PHP script not working? Thinking about spouting a long string of curses over it all just to make yourself feel a bit better about things? Well, if it's a PHP shell script, don't use curses - use ncurses! In this new tutorial from Zend, they talk about how to create a ncurses window set with PHP, and how to use and abuse those windows.
Now, to use this tutorial, you will need to have access to PHP compiled with –with-ncurses on a Unix-based system. Not all terminals will support colorized ncurses output so this tutorial will not use any coloring functions. Once you have that, you can dive right into the sample code they give you and create some nice, easy ncurses applications. The final example they give even creates a nice, clean looking traceroute window with the ncurses interface options.
Using these techniques can vastly help your PHP shell script - not only in how it runs, but, by making the interface easier and cleaner, you lower the risk that the user interacting will choose something they don't want to do...




