 <p>This is the way:</p> <p><a href="http://stackoverflow.com/questions/717854/sftp-from-within-php">SFTP from within PHP</a></p> <p>use cURL from PHP to query the remove SFTP server, for both listing and file retrieval.</p> <p>Manual for php is <a href="http://www.php.net/manual/en/book.curl.php" rel="nofollow noreferrer">here</a>. You don't need any SSH scripts (which by the way is usually strictly forbidden on most shared hosting environment), if your sFTP server is publicly available. Curl will do everything for you.</p>