Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

cvs: phpdoc /en/reference/ssh2/functions ssh2-exec.xml ssh2-fetch-stream.xml
pollita		Wed Dec 29 23:24:05 2004 EDT

Modified files:
/phpdoc/en/reference/ssh2/functions	ssh2-exec.xml
ssh2-fetch-stream.xml
Log:
Document ssh2_exec() and ssh2_fetch_stream()

http://cvs.php.net/diff.php/phpdoc/...
2&r2=1.3&ty=u
Index: phpdoc/en/reference/ssh2/functions/ssh2-exec.xml
diff -u phpdoc/en/reference/ssh2/functions/ssh2-exec.xml:1.2 phpdoc/en/refer
ence/ssh2/functions/ssh2-exec.xml:1.3
--- phpdoc/en/reference/ssh2/functions/ssh2-exec.xml:1.2	Wed Dec 29 11:06:16
 2004
+++ phpdoc/en/reference/ssh2/functions/ssh2-exec.xml	Wed Dec 29 23:24:05 200
4
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc.
 -->
<refentry id="function.ssh2-exec">
<refnamediv>
@@ -17,11 +17,31 @@
<methodparam choice="opt"><type>array</type><parameter>env</parameter></meth
odparam>
</methodsynopsis>

-    <para>
+    <simpara>
Execute a command at the remote end and allocate a channel for it.
Returns a stream on success or &false; on failure.
-    </para>
+    </simpara>

+    <example>
+     <title>Executing a command</title>
+     <programlisting role="php">
+<![CDATA[
+<?php
+$connection = ssh2_connect('shell.example.com', 22);
+ssh2_auth_password($connection, 'username', 'password');
+
+$stream = ssh2_exec($connection, '/usr/local/bin/php -i');
+?>
+]]>
+     </programlisting>
+    </example>
+
+    <simpara>
+     See Also:
+     <function>ssh2_connect</function>,
+     <function>ssh2_shell</function>, and
+     <function>ssh2_tunnel</function>
+    </simpara>
</refsect1>
</refentry>

http://cvs.php.net/diff.php/phpdoc/...1.1&r2=1.2&ty=u
Index: phpdoc/en/reference/ssh2/functions/ssh2-fetch-stream.xml
diff -u phpdoc/en/reference/ssh2/functions/ssh2-fetch-stream.xml:1.1 phpdoc/
en/reference/ssh2/functions/ssh2-fetch-stream.xml:1.2
--- phpdoc/en/reference/ssh2/functions/ssh2-fetch-stream.xml:1.1	Fri Dec 24 
20:03:17 2004
+++ phpdoc/en/reference/ssh2/functions/ssh2-fetch-stream.xml	Wed Dec 29 23:2
4:05 2004
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc.
 -->
<refentry id="function.ssh2-fetch-stream">
<refnamediv>
@@ -16,9 +16,34 @@
<methodparam><type>int</type><parameter>streamid</parameter></methodparam>
</methodsynopsis>

-    <para>
-     Fetch an alternate substream associated with an SSH2 channel stream.
-    </para>
+    <simpara>
+     Fetches an alternate substream associated with an SSH2 channel stream
+     identified by <parameter>streamid</parameter>.  The SSH2 protocol
+     currently defines only one substream, STDERR, which has a substream ID
+     of <constant>SSH2_STREAM_STDERR</constant> (defined as 1).
+    </simpara>
+
+    <example>
+     <title>Opening a shell and retreiving the stderr stream associated wit
h it.</title>
+     <programlisting role="php">
+<![CDATA[
+<?php
+$connection = ssh2_connect('shell.example.com', 22);
+ssh2_auth_password($connection, 'username', 'password');
+
+$stdio_stream = ssh2_shell($connection);
+$stderr_stream = ssh2_fetch_stream($stdio_stream, SSH2_STREAM_STDERR);
+?>
+]]>
+     </programlisting>
+    </example>
+
+    <simpara>
+     See Also:
+     <function>ssh2_shell</function>,
+     <function>ssh2_exec</function>, and
+     <function>ssh2_connect</function>
+    </simpara>

</refsect1>
</refentry>



Report this thread to moderator Post Follow-up to this message
Old Post
Sara Golemon
12-30-04 08:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Documentation archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:52 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.