I am making a simple command line PHP program. Currently, when the user types in his password, you can see it on the screen in plain text. How can I make the password either not be echoed on the screen or have the password be echoed on the screen as asterisks?
$pass = "";
while($pass != "password")
echo "Enter your login password and press ENTER.\n\n\n";
$pass = trim(fgets(STDIN)); // reads one line from STDIN
} // END WHILE LOOP THAT CHECKS PASSWORD