[PHP-DEV] Re: getpass() wrapper

2007-03-20 Thread Daniel Rozsnyo
Sara Golemon wrote: I am working on a command line client (written in php, run by php-cli) and I'd like to use a password entry as in mysql client - with no echoing etc. I've found the function which I need: #include char *getpass( const char * prompt ); But in man getpass it i

Re: [PHP-DEV] Re: getpass() wrapper

2007-03-20 Thread Edin Kadribasic
If you just want to enter password on a Unix-like system you could use the following: /dev/null || " . "stty -echo cbreak" ); echo "$prompt: "; // Get rid of newline when reading stdin $r = substr(fgets(STDIN), 0, -1); echo "\n"; system ("stty $ostty"); return

[PHP-DEV] Re: getpass() wrapper

2007-03-20 Thread Sara Golemon
I am working on a command line client (written in php, run by php-cli) and I'd like to use a password entry as in mysql client - with no echoing etc. I've found the function which I need: #include char *getpass( const char * prompt ); But in man getpass it is marked as "This fun