Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54162 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44840 invoked from network); 23 Jul 2011 19:16:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jul 2011 19:16:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.210.44 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.210.44 mail-pz0-f44.google.com Received: from [209.85.210.44] ([209.85.210.44:52748] helo=mail-pz0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 45/60-42580-A1E1B2E4 for ; Sat, 23 Jul 2011 15:16:43 -0400 Received: by pzk5 with SMTP id 5so6687829pzk.31 for ; Sat, 23 Jul 2011 12:16:39 -0700 (PDT) Received: by 10.142.6.1 with SMTP id 1mr1664159wff.267.1311448598647; Sat, 23 Jul 2011 12:16:38 -0700 (PDT) Received: from [192.168.200.5] (c-50-131-46-20.hsd1.ca.comcast.net [50.131.46.20]) by mx.google.com with ESMTPS id t20sm2217792wfe.12.2011.07.23.12.16.37 (version=SSLv3 cipher=OTHER); Sat, 23 Jul 2011 12:16:37 -0700 (PDT) Message-ID: <4E2B1E14.1020508@lerdorf.com> Date: Sat, 23 Jul 2011 12:16:36 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110627 Thunderbird/5.0 MIME-Version: 1.0 To: Reindl Harald CC: Mailing-List php References: <4E2B1C0E.9040104@thelounge.net> In-Reply-To: <4E2B1C0E.9040104@thelounge.net> X-Enigmail-Version: 1.2pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] CLI: input password without showing it From: rasmus@lerdorf.com (Rasmus Lerdorf) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/23/2011 12:07 PM, Reindl Harald wrote: > hi > > is there any way to request a password from a user without showing > the input in the terminal? > > $input_pwd = trim(fgets(STDIN)); > > works nice as long no foreigner is in the room :-( Really not an internals question. This is more a StackOverflow type of question, where in fact this has been asked and answered a couple of times: http://stackoverflow.com/questions/187736/command-line-password-prompt-in-php - -Rasmus -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4rHhQACgkQlxayKTuqOuDJTgCfc8gHHXqc2hioxYqA5aOGmhpk OeAAnArlpmj+jbeyAmxbsHtxRIwNwN+o =nU1k -----END PGP SIGNATURE-----