<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Interactive CLI password prompt in PHP</title>
	<atom:link href="http://www.sitepoint.com/blogs/2009/05/01/interactive-cli-password-prompt-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepoint.com/blogs/2009/05/01/interactive-cli-password-prompt-in-php/</link>
	<description>News, opinion, and fresh thinking for web developers and designers. The official podcast of sitepoint.com.</description>
	<lastBuildDate>Sun, 22 Nov 2009 11:54:05 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dave</title>
		<link>http://www.sitepoint.com/blogs/2009/05/01/interactive-cli-password-prompt-in-php/comment-page-1/#comment-925648</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 15 May 2009 17:23:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=8737#comment-925648</guid>
		<description>This works great. Thanks!</description>
		<content:encoded><![CDATA[<p>This works great. Thanks!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: irshad_sheikh</title>
		<link>http://www.sitepoint.com/blogs/2009/05/01/interactive-cli-password-prompt-in-php/comment-page-1/#comment-925533</link>
		<dc:creator>irshad_sheikh</dc:creator>
		<pubDate>Wed, 13 May 2009 10:13:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=8737#comment-925533</guid>
		<description>Nice code.</description>
		<content:encoded><![CDATA[<p>Nice code.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Robert K</title>
		<link>http://www.sitepoint.com/blogs/2009/05/01/interactive-cli-password-prompt-in-php/comment-page-1/#comment-925190</link>
		<dc:creator>Robert K</dc:creator>
		<pubDate>Tue, 05 May 2009 07:53:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=8737#comment-925190</guid>
		<description>Not bad at all - i&#039;ve just been using javascript based techniques. This looks very useful also php-gtk looks good also. Thanks!</description>
		<content:encoded><![CDATA[<p>Not bad at all &#8211; i&#8217;ve just been using javascript based techniques. This looks very useful also php-gtk looks good also. Thanks!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Troels Knak-Nielsen</title>
		<link>http://www.sitepoint.com/blogs/2009/05/01/interactive-cli-password-prompt-in-php/comment-page-1/#comment-925045</link>
		<dc:creator>Troels Knak-Nielsen</dc:creator>
		<pubDate>Fri, 01 May 2009 09:54:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=8737#comment-925045</guid>
		<description>OK, I couldn&#039;t get the &lt;code&gt;ScriptPW&lt;/code&gt; trick to work, but I&#039;ve now updated the snippet above to use the basic password-prompt, if the OS is Windows. This should make the function fully portable.</description>
		<content:encoded><![CDATA[<p>OK, I couldn&#8217;t get the <code>ScriptPW</code> trick to work, but I&#8217;ve now updated the snippet above to use the basic password-prompt, if the OS is Windows. This should make the function fully portable.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Troels Knak-Nielsen</title>
		<link>http://www.sitepoint.com/blogs/2009/05/01/interactive-cli-password-prompt-in-php/comment-page-1/#comment-925043</link>
		<dc:creator>Troels Knak-Nielsen</dc:creator>
		<pubDate>Fri, 01 May 2009 09:10:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=8737#comment-925043</guid>
		<description>@ognjen: Yeah, Wordpress messes peoples comments up. It&#039;s rather annoying.


I just tested it on Windows and it works. It would be nice to do without the vbs file, but I guess the php-script could just generate it as a temp-file, and delete it afterwards.


The InputBox doesn&#039;t mask the password, but &lt;a href=&quot;http://www.microsoft.com/technet/scriptcenter/resources/qanda/feb05/hey0204.mspx&quot; rel=&quot;nofollow&quot;&gt;it seems to be possible to do&lt;/a&gt;, using a few more lines of vb-script:

&lt;code&gt;
Wscript.Echo(CreateObject(&quot;ScriptPW.Password&quot;).GetPassword())
&lt;/code&gt;
</description>
		<content:encoded><![CDATA[<p>@ognjen: Yeah, Wordpress messes peoples comments up. It&#8217;s rather annoying.</p>
<p>I just tested it on Windows and it works. It would be nice to do without the vbs file, but I guess the php-script could just generate it as a temp-file, and delete it afterwards.</p>
<p>The InputBox doesn&#8217;t mask the password, but <a href="http://www.microsoft.com/technet/scriptcenter/resources/qanda/feb05/hey0204.mspx" rel="nofollow">it seems to be possible to do</a>, using a few more lines of vb-script:</p>
<code>
Wscript.Echo(CreateObject("ScriptPW.Password").GetPassword())
</code>]]></content:encoded>
	</item>
	<item>
		<title>By: ognjen</title>
		<link>http://www.sitepoint.com/blogs/2009/05/01/interactive-cli-password-prompt-in-php/comment-page-1/#comment-925041</link>
		<dc:creator>ognjen</dc:creator>
		<pubDate>Fri, 01 May 2009 09:00:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=8737#comment-925041</guid>
		<description>Of course, in example above, vbs script should be in two lines.
Or in one:
&lt;code&gt;
wscript.echo InputBox(&quot;Input password&quot;, &quot;&quot;, &quot;password here&quot;)&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Of course, in example above, vbs script should be in two lines.<br />
Or in one:<br />
<code>
wscript.echo InputBox("Input password", "", "password here")</code></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.sitepoint.com/blogs/2009/05/01/interactive-cli-password-prompt-in-php/comment-page-1/#comment-925038</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 01 May 2009 08:41:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=8737#comment-925038</guid>
		<description>something like this could work at Win.

prompt.vbs:
&lt;code&gt;
pass = InputBox(&quot;Input password&quot;, &quot;&quot;, &quot;password here&quot;)
wscript.echo pass&lt;/code&gt;

prompt.php:
&lt;code&gt;
echo (exec(&#039;cscript //nologo prompt.vbs&#039;));
&lt;/code&gt;

If promp.vbs and prompt.php are in same folder and php is Path, cmd could be e.g.:
D:\&gt;php prompt.php</description>
		<content:encoded><![CDATA[<p>something like this could work at Win.</p>
<p>prompt.vbs:<br />
<code>
pass = InputBox("Input password", "", "password here")
wscript.echo pass</code></p>
<p>prompt.php:<br />
<code>
echo (exec('cscript //nologo prompt.vbs'));
</code></p>
<p>If promp.vbs and prompt.php are in same folder and php is Path, cmd could be e.g.:<br />
D:\&gt;php prompt.php</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Troels Knak-Nielsen</title>
		<link>http://www.sitepoint.com/blogs/2009/05/01/interactive-cli-password-prompt-in-php/comment-page-1/#comment-925034</link>
		<dc:creator>Troels Knak-Nielsen</dc:creator>
		<pubDate>Fri, 01 May 2009 07:42:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=8737#comment-925034</guid>
		<description>
@magnusdopus: Good tip. The only downside is that it adds a pretty heavy dependency if you aren&#039;t already using gtk for anything else. I was thinking that it must be possible to use windows scripting host to pop up a modal box somehow, but I haven&#039;t investigated further.


@Coder Jim: In theory, but Cygwin has some problems with interactive shell features, so I wouldn&#039;t be surprised if it didn&#039;t work. Haven&#039;t tried it though.


@Lachlan: readline echoes input to the screen.
</description>
		<content:encoded><![CDATA[<p>@magnusdopus: Good tip. The only downside is that it adds a pretty heavy dependency if you aren&#8217;t already using gtk for anything else. I was thinking that it must be possible to use windows scripting host to pop up a modal box somehow, but I haven&#8217;t investigated further.</p>
<p>@Coder Jim: In theory, but Cygwin has some problems with interactive shell features, so I wouldn&#8217;t be surprised if it didn&#8217;t work. Haven&#8217;t tried it though.</p>
<p>@Lachlan: readline echoes input to the screen.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Lachlan</title>
		<link>http://www.sitepoint.com/blogs/2009/05/01/interactive-cli-password-prompt-in-php/comment-page-1/#comment-925013</link>
		<dc:creator>Lachlan</dc:creator>
		<pubDate>Fri, 01 May 2009 00:26:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=8737#comment-925013</guid>
		<description>How about readline?

http://www.php.net/manual/en/function.readline.php</description>
		<content:encoded><![CDATA[<p>How about readline?</p>
<p><a href="http://www.php.net/manual/en/function.readline.php" rel="nofollow">http://www.php.net/manual/en/function.readline.php</a></p>]]></content:encoded>
	</item>
	<item>
		<title>By: magnusdopus</title>
		<link>http://www.sitepoint.com/blogs/2009/05/01/interactive-cli-password-prompt-in-php/comment-page-1/#comment-924999</link>
		<dc:creator>magnusdopus</dc:creator>
		<pubDate>Thu, 30 Apr 2009 21:31:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=8737#comment-924999</guid>
		<description>We used php-gtk for this.  Works great on windows!</description>
		<content:encoded><![CDATA[<p>We used php-gtk for this.  Works great on windows!</p>]]></content:encoded>
	</item>
</channel>
</rss>
