Passionate geek, interested in Technology. Proud father of two
Read from STDIN without echoing the input back
Today i was looking for a way to read passwords from a PHP-CLI script. So it was important the password didn’t appear on the console. I wrote a ttyecho function that uses stty to change the terminal line settings.