Subject: Re: Request for help for beginner, thanks!

Re: Request for help for beginner, thanks!

From: David Spector <dev_at_springtimesoftware.com>
Date: Sun, 17 Jan 2021 11:58:31 -0500

Dan Fandrich, Thanks for the helpful reply.

I will be maintaining a simple local database (possibly as zero-length
file directory entries) representing when each website page was last
built, as a cache. Then, when a build of a website is requested, my
program will use the database to find which files actually have to be
rebuilt and uploaded to the production server. All this processing is
done in PHP, so it seemed natural to use sFTP in PHP to do the uploading
of the 0 or more files that need to be uploaded (see the simplicity of
my sample insecure program above).

Can a cURL command be executed by a PHP program to accomplish the uploading?

I'm willing to use cURL, Windows sftp, PHP ssh2 commands, or even the
rather large PHP library called phpseclib if I have no other choice.

I just want to upload files from PHP using a private RSA key for
security. I intend to disable old-fashioned and insecure FTP on my
production server soon, so sFTP will be a must in all my PHP website
management programs in the future.

David
_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2021-01-17