Am trying to display image from another server to the dashboard using PHP. I am able to get the file names in the directory and authentication is a success. But unable to view that image using src.
<?PHP
$connection = ssh2_connect('servername', 22);
ssh2_auth_password($connection, 'username', 'password');
$sftp = ssh2_sftp($connection);
$handle = opendir('ssh2.sftp://' . intval($sftp) . '/path/');
while (false != ($entry = readdir($handle))){
echo "$entry\n";
echo '<img src="ssh2.sftp://' . intval($sftp) . '/path/'.$entry.'">'; // Not working
}
?>