|
Posted by matt VanDeWalle on 09/29/07 11:26
hello,
I am wanting to turn of screen echo for a login function or changing a
password or similar things. I got the function to almost work, however it
turns off the screen echo but it asks for the password, won't give you a
chance to fill it in, and skips right on to the next prompt(and has the
"non-echoing" for that stuff. incase this isn't clear which i assume alot
of things which I guess i shouldnt ok, what i am doing:
*/ code snippit here */
socket_write($sock, "enter a username");
$name = socket_read($sock, 1024, PHP_NORMAL_READ);
/* all good to this point */
socket_write($sock, "enter a password");
socket_write($sock, sprintf("%c%c%c",255,251,1));
$pwd = socket_read($sock, 1024, PHP_NORMAL_READ);
/* will skip right on by to the next prompt and fill in $pwd with some of
those non-alphanumeric chars */
and the next prompt is where the no-screen-echo finally works like it
should
I must be doing something incorrectly but, what?
thanks
matt
[Back to original message]
|