Passwort verdeckt mit PHP einlesen

Bastian Schern <[email protected]>
Newsgroups gmane.linux.suse.programming
Message-ID <[email protected]>
Hallo *,

weiß jemand, wie ich mit PHP ein Passwort von der Tastatur aus in einen 
String einlesen kann, ohne dass man es auf dem Bildschirm sieht?

Das Einlesen mache ich bisher so:
--- snip ---

function readline( $prompt="" )
{
     print( $prompt );
     $out = "";
     $key = "";
     $key = fgetc( STDIN );
     while( $key != "\n" ) {
         $out .= $key;
         $key = fread(STDIN, 1);
     }
     return $out;
}

$password = readline( "DB password: " );

--- snap ---

Viele GrÌße
	Bastian

____________
Virus checked by G DATA AntiVirusKit
Version: AVK 16.5107 from 26.01.2006
Virus news: www.antiviruslab.com



-- 
Um die Liste abzubestellen, schicken Sie eine Mail an:
    [email protected]
Um eine Liste aller verfÃŒgbaren Kommandos zu bekommen, schicken
Sie eine Mail an: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.