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

Re: Request for help for beginner, thanks!

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Sun, 17 Jan 2021 10:18:39 -0800

On Sun, Jan 17, 2021 at 11:58:31AM -0500, David Spector wrote:
> 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 not familiar with the PHP binding to libcurl, but I gather it is pretty
complete. A quick search let me to this page with some sample code:
https://stackoverflow.com/questions/18180564/how-to-upload-file-with-curl-on-sftp-server
so it definitely looks possible.

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