returning data from an ssh2_exec()


Posted on 16th Feb 2014 07:03 pm by admin

here's what i got.


$conn = ssh2_connect($this->_host);
ssh2_auth_password($conn,$this->_user,$this->_pass)or die("Cannot Connect");
//build command line to include this jobnumber
$command = '/usr/local/bin/invoiced_date.sh ' . $jobnumber;
//issue the command line
$stream = ssh2_exec($conn,$command);
stream_set_blocking($stream,true);

$output = ssh2_fetch_stream($stream,SSH2_STREAM_STDERR);
echo 'what i got: ' . $output;


when this echo's i get.

Code: [Select]what i got: Resource id #7

how do i turn Resource id #7 into actual information?

Thanks in advance,

No comments posted yet

Your Answer:

Login to answer
342 Like 37 Dislike
Previous forums Next forums
Other forums

Comment Mod System Effects all rows...
Sorry if its confusing but here is whats going on: I have a table in a database called comments and

Help with echo()
I'm having some problems with this code:

Code: echo '
<A HREF="jav

How to copy a part of a vector in a raw memory
Hi,

How can I copy a part of a vector into a memory:

1
2
3
4
5

SAP Project Module
I have seen in the SAP Project Module,plan cost and budget are not equal and even difference is sign

exclude characters from counting?
Hello, I wanted to ask if you have a string like:
Code: $my_s='ASRGREGTGTR----REGREGRE+++RRRRRR..

php title problem
Hi,

I am having a problem managing my page title with PHP.

Currently I have my <

How to use Ajax to verify data on a DB ?
Hello everyone, well i want to know how to check a value if it exists or not on a Data base and capt

quick basic question, hopefully not dumb
I don't know how to search for this, so forgive me if it's been covered...

I often see an exa

Passing Variables
What I'm wanting to do is when the user clicks on Arenas it will know the name of the country it's w

Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash