How to upload via SFTP with allow_url_open disabled?

[email protected] (Scott Teresi)
Newsgroups php.general
Message-ID <C8772EF4.49ABF%[email protected]>
I'm attempting to send a file over SFTP in PHP, but all the examples I find
online do something like this:

   $stream = @fopen("ssh2.sftp://xxxxxxxxxxxxxxxxxx", 'w');
   @fwrite($stream, $data_to_send)

This requires "allow_url_fopen" to be enabled on the server, to get a stream
for the remote file.

I maintain the server but would like to keep "allow_url_fopen" disabled. If
I do that, how can I send a file over SFTP?

Thanks for any help people can provide!!

Scott Teresi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.