Re: How to upload via SFTP with allow_url_open disabled?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You might have better luck with phpseclib's Net_SFTP, which uses fsockopen:

http://phpseclib.sourceforge.net/documentation/net.html#net_sftp_example

Good luck!

On Thu, Jul 29, 2010 at 12:13 PM, Scott Teresi <scott75@xxxxxxxxx> wrote:
> 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
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux