On Thu, 2004-09-09 at 14:10, Martin Holm wrote: > I'm currently working on some stuff with php-cli and got a few problem. > > I want to be able to read one single character from stdin via keyboard, > ie. pressing a button. > It works fine if I use enter as newline afterwards, but I would like to > do it without pressing enter. > Thus, I have to turn off buffering in the input stream but I can't find > any way to do it. > > Been looking everywhere on php.net but can't find any hints.
I have never been able to find a way to disable STDIN buffering in PHP. You may find ncurses_getch() of use however. http://www.php.net/ncurses_getch -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php