Re: Hoping for a working example of SFTP in PHP
| From: | David Spector | Date: | Tue, 09 Feb 2021 23:24:32 +0000 |
| Subject: | Re: Hoping for a working example of SFTP in PHP | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-327485@lists.php.net to get a copy of this message | ||
To anyone interested, the final commented examples are on the Web at:
www.springtimesoftware.com/example-copy.txt
and
www.springtimesoftware.com/example-ssh2.txt
Both do the authentication and file upload of a tiny test file in about 1 to 2 seconds, using slightly different functions.
The examples have most error handling removed, as such handling is not essential to understanding the examples and as all errors seem to be reported by PHP without special handling, at least on my computer.
There will be some PHP.ini and other notes when I publish these.
I plan to add them to the PHP Manual via GitHub push sometime soon.
A big thank-you to Eric Wheeler, without whom these examples would only have remained a faint hope. He was willing to work hard to make SFTP work in PHP.
David