HI
how can i split character from stream and insert into array. Actually i am a beginner and i was asking same help in IRC channel and they are talking about big things don't even replaying to my question
please check below code
<?php
$zonename = array();
$index = 0;
$connection = ssh2_connect('172.16.101.80', 22, array('hostkey'=>'ssh-rsa'));
if (ssh2_auth_pubkey_file($connection, 'root',
'/var/www/html/ssh/id_rsa.pub',
'/var/www/html/ssh/id_rsa', 'secret')) {
//echo "Public Key Authentication Successful\n";
} else {
die('Public Key Authentication Failed');
}
if($output = ssh2_exec($connection, 'zoneadm list -cv | awk \'NR > 1 {print $2}\'')) {
stream_set_blocking($output, true);
echo stream_get_contents($output);
}
?>
and the output of this is like below:
global propertytest_N aimsinftest aimsapstest comsdbtest comsapstest boomitest kcc-trading golddbaptest aimsdbtest propertytest
how can i split each character and put into array? actually i want to insert this values into mysql later
Regards,
Ben