$stream = ssh2_exec($connection, "ls -lR $path");
while(!feof($stream)){
$line = fgets($stream);
/* write $line to a database */
}
This works fine if the stream output generates only a few lines.
But if the output generates like 2000 lines the while cicle never ends, but the data are all write down to the data base. So it seems that the comand is not sending the eof sgnal!!!
Thus anyone got experience with this function who could help me. Thanks